Re: Very Odd Session Array Problem
| From: | Aaron Axelsen | Date: | Mon, 20 Dec 2004 22:04:05 +0000 |
| Subject: | Re: Very Odd Session Array Problem | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204766@lists.php.net to get a copy of this message | ||
I understand the recursion part, but i dont understand why this fixes it:
$quoteString = implode(",",$_SESSION['quotes'][$key]);
$_SESSION['quotes'][$key] = explode(",",$quoteString);
That is essentially just reading the values out, and sticking them back in.
Jason Barnett wrote:
If i dont do that, when i do a print_r($_SESSION['quotes'][$key]) i get-- Aaron Axelsen lists@frozenpc.net Great hosting, low prices. Modevia Web Services LLC -- http://www.modevia.comerrors that say RECURSION and its almost like the arrays are making newIf you have a SESSION['quotes'] array... and one of the elements in the array references the same SESSION['quotes'] array... then you are going to have recursion. It's not exactly an error, but it *is* a recursive array that never ends because it keeps pointing to itself. Hopefully this makes sense?