Total Pageviews

Tuesday, January 17, 2012

Split variable to many variables

hello ,
if you are going to split 1 variable to many . 

<?php
// Delimiters may be slash, dot, or hyphen
$date "04/30/1973";
list($month$day$year) = split('[/.-]'$date);
echo "Month: $month; Day: $day; Year: $year<br />\n";
?>
that mean it will split the $date to >$mounth  , $day and $year .




No comments:

Post a Comment