note 50262 added to function.explode
| From: | elyas07 at gmail dot com | Date: | Wed, 23 Feb 2005 11:21:36 +0000 |
| Subject: | note 50262 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85409@lists.php.net to get a copy of this message | ||
This is a way to explode date, month and year..
<?
$dmy="01-12-2005"; //dmy to be exploded
function explode_dmy($dmy) { //function starts
$dmyarray=explode ("-",$dmy); //exploding
$d=$dmyarray[0]; //date into the array
$m=$dmyarray[1]; //month into the array
$y=$dmyarray[2]; //year into the array
echo $d\n;
echo $m\n;
echo $y\n;
}//function ends
?>
hope this helps...
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50262
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50262&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50262&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50262&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50262&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50262&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50262&report=yes
Search -- http://master.php.net/manage/user-notes.php