+1  A: 

substr accepts $string, $start, and an optional $length. Try using 2 instead of 6 in both month and day.

Aaron Hathaway
oh, it's length, not end position
polar
+2  A: 

PHP's substr is string substr ( string $string , int $start [, int $length ] )

So your code should read as:

print(substr($now, 0, 4)); //year

print(' ');

print(substr($now, 4, 2)); //month

print(' ');

print(substr($now, 6, 2)); //day 

http://php.net/manual/en/function.substr.php

Chad