|
Posted by Rik on 01/18/07 17:44
drako wrote:
> drako wrote:
>> You are correct in assuming that I chopped out a line when I posted
>> this...
>>
>> The missing line between '$x=0' and
>> '$_SESSION["increment"][$x]=array(...)'.
>>
>> is
>>
>> if(isset($_SESSION["increments"])) {$x =
>> count($_SESSION["increments"]);}
>>
>> The purpose is to count the number of entries in the array - if count
>> returns '5', then the last value of $x would have been 4, so we can
>> assign '5' as the next value in the array.
>>
>> Could this be the offending line...
> Sorry, the extra line of code above should have read:
>
> if(isset($_SESSION["increment"])) {$x =
> count($_SESSION["increment"]);}
>
> I just noticed the typo, in case anyone has been sharp enough to spot
> it...
But that's not it afaik. See the comment about just using empty [], this
will just add an array-value to the end.
However, there's something else going on in the adding. Posting the total
code that works on $_SESSION["increment"] woudl speed up the process :-).
You probably have a $_SESSION["increment"] = something(); somehere, where
the function just returns true instead of a processed array, casting it to
the '1' string.
--
Rik Wasmus
Navigation:
[Reply to this message]
|