Re: Name of variable to string [SOLVED]
| From: | tedd | Date: | Fri, 08 Feb 2008 21:59:50 +0000 |
| Subject: | Re: Name of variable to string [SOLVED] | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268992@lists.php.net to get a copy of this message | ||
At 1:39 PM -0800 2/8/08, Jim Lucas wrote:
So, how is this any better then just doing this $_SESSION = array_merge(array_merge($_SESSION, $_POST), $_GET); If I replace the two calls to sessionize_*() with the above line, I get the same results. Not sure what I am missing.First, I didn't say it was better. Second, you're not missing anything. Third, if I wanted to merge the arrays, I could use REQUEST and forget the merge. I was just trying to get the "check the current value of post or get variable and put it into a session" with a single simple statement of: $whatever = serialize($whatever); Now, I've have to continue with my original: $whatever = serialize('whatever'); When dealing with just a few variables, it's not a big deal. But, with the numbers I've been dealing with lately, I was looking to create something simple to cut and paste into. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com