note 30501 added to function.explode
| From: | CyberPHP at rack1 dot php dot net | Date: | Thu, 20 Mar 2003 13:45:20 +0000 |
| Subject: | note 30501 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45549@lists.php.net to get a copy of this message | ||
How to do that with the explode function :
$stringtoexplode = "Smith;26;90";
$col_headers[0] = "Name";
$col_headers[1] = "Age";
$col_headers[2] = "Weight";
$info = explode(";",$stringtoexplode);
******
I obtain :
$info[0]="Smith"
$info[1]="26"
$info[2]="90"
*********
but I want :
$info["Name"]="Smith"
$info["Age"]="26"
$info["Weight"]="90"
--
http://www.php.net/manual/en/function.explode.php
http://master.php.net/manage/user-notes.php?action=edit+30501
http://master.php.net/manage/user-notes.php?action=delete+30501
http://master.php.net/manage/user-notes.php?action=reject+30501