Sway's Blog

PHP

ip.php

by on Okt.04, 2018, under PHP


echo $_SERVER['REMOTE_ADDR'];

Leave a Comment more...

mktime – Start/Ende vergangener Monate

by on Mrz.20, 2018, under Allgemein, PHP

$start_date=mktime(0,0,1,date($month)-7,1,date($year));
echo date(‚d-m-Y‘,$start_date);
$end_date=mktime(23,59,59,date($month)-6,0,date($year));
echo date(‚d-m-Y‘,$end_date);

Leave a Comment more...

Dynamische Variablennamen in PHP

by on Mrz.11, 2015, under PHP

Mit der normalen Variablendeklaration:

$variable = ‚inhalt‘;

Mit PHP sind dynamische Variablennamen auch kein Problem:

${‚variable‘.$dynamisch} = ‚inhalt‘;

Leave a Comment more...

Duplikate im PHP Array finden

by on Jan.29, 2015, under Computer, PHP

function get_duplicates( $array ) {
return array_unique( array_diff_assoc( $array, array_unique( $array ) ) );
}

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!