note 33359 deleted from function.parse-str by nlopess
| From: | nlopess@php.net | Date: | Thu, 18 Mar 2004 13:50:16 +0000 |
| Subject: | note 33359 deleted from function.parse-str by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67015@lists.php.net to get a copy of this message | ||
Note Submitter: Leo
----
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~