Re: getting serialized variable names & values
| From: | Marek Kilimajer | Date: | Mon, 05 May 2003 11:06:24 +0000 |
| Subject: | Re: getting serialized variable names & values | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146418@lists.php.net to get a copy of this message | ||
$val is only a copy of $storevars[$key], so assign your new value to $storevars[$key] and it will work
Jason Dulberg wrote:
I'm serializing an array and inserting it into a mysql db however I'm running into trouble when I'd like to retrieve variable names and values from a different page. (after unserializing) I can get the names & values using "while(list($key,$val)=each($storevars))" however I cannot manipulate the variable name/value using that method. So basically all I'm after is a way to retrieve the variable names and assign the corresponding values to them according to how they were when I first serialized them. How would I go about doing such a thing? Jason