|
Posted by mantrid on 12/28/07 20:30
"Ivαn Sαnchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:fl39jc$3pl$1@hercules.cohp1...
> mantrid wrote:
>
> [...]
> > I haven't used arrays much so im probably overlooking something obvious.
> [...]
>
> You overlooked something, but it is not so obvious.
>
> I said:
>
> foreach($data as $key=>&$item)
>
> but you wrote:
>
> foreach($data as $key=>$item)
>
>
> See the difference? Now, your homework is to go back to the PHP manual and
> read everything about references and the "foreach" language construct ;-)
>
> --
> ----------------------------------
> Ivαn Sαnchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> No, mamα, no...·GΫ{;Θ... NO CARRIER
I purposely left the & out as initially it gave an error (below) with it, so
I thought it was just a typo
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in
/home/iddsoftw/public_html/cgtcalc/profitloss.php on line 368
Is it to do with the php version I use, which I believe is 4.something
Also I presume the
Navigation:
[Reply to this message]
|