I want split a string using PHP to get a individual date info.
For example:
$date = '08/05/2010';
would create the varables
$month = '08'; $day = '05'; $year = '2010';
Thank you.
Use explode:
explode
$date = '08/05/2010'; list($month, $day, $year) = explode('/', $date);
2.1m questions
2.1m answers
60 comments
57.0k users