I have an array of Unix timestamps. I used the following code to make a file path of the timestamps array ($i is used later in a loop, but at first it gets value 0 and so it's correct):
$date = date('d-m-y', $timestamp[$i]);
$path = $dir . '/' . $date '.csv';
Let's say there many timestamps in the array. If i set $i = 0; $date is a string 06-01-13 (it returns the current day, though timestamp is many weeks old), and it ignores the timestamp. But if I replace $timestamp[$i] with 1257426933 the output string is correct (05-11-09).
What's wrong? My PHP version is PHP 5.3.10-1ubuntu3.4
var_dump( $timestamp[$i] );