note 33359 added to function.parse-str

From: Date: Mon, 23 Jun 2003 21:18:06 +0000
Subject: note 33359 added to function.parse-str
Groups: php.notes 
Request: Send a blank email to php-notes+get-50902@lists.php.net to get a copy of this message
when parsing a simple list of files or information retrieved from a database or other source, it's best to use explode. i spent a some amount of time trying to figure out how I could use parse_str to that end, but explode made my world a lot easier. //snippet $result = mysql_query ("SELECT access FROM users WHERE id=1") or die ("ERROR in query - unable to select information"); $myrow = mysql_fetch_array($result); $pdfs = $myrow["access"]; $files = explode (" ", $pdfs); echo $filers[$i]; //end snippet hope that saves someone some time and confusion~ ---- Manual Page -- http://www.php.net/manual/en/function.parse-str.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33359 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33359&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33359&report=yes

« previous php.notes (#50902) next »