[Wylug-help] PHP foreach help - Solved

Gary Stainburn gary.stainburn at ringways.co.uk
Thu Nov 19 16:44:38 UTC 2009


On Thursday 19 November 2009 16:24:04 William F. McCaw wrote:
>    In that case the problem would seem to be somewhere in the code that's
> not shown I'm afraid...  Have you tried adding error logging to check
> the "$dets['tab']" value at the start of the second loop ?
>
>    This is a complete stab in the dark here but, the first loop isn't
> located in a different function to the second, with the $List array being
> passed in as a parameter is it ?  If so, is the array being passed in by
> reference rather than by value (the latter case would mean the changes by
> loop 1 to the copy of the array within the function would be lost when the
> function ended).

You were partly right. The problem was in some spurious data which was 
affecting some of the code not shown.

-- 
Gary Stainburn

Gary's Haircut 700
Please visit http://www.justgiving.com/Gary-Stainburn/ to help me 
raise money for Cancer Research - in return I'll have my head shaved
 



More information about the Wylug-help mailing list