Posted by Kevin Wells on 05/21/06 18:37
In message <zi_bg.181096$xt.49656@fe3.news.blueyonder.co.uk>
"Paul F. Johnson" <paul@all-the-johnsons.co.uk> wrote:
>Bent Stigsen wrote:
>
>> Paul wrote:
>
>>> I know the substr stuff works (I can test that and it's fine and dandy).
>>> I know the $month et al works as well (I've cut and pasted it from a
>>> website I run at work). However, I'm not at all sure that how I'm using
>>> the empty arrays (especially the multi-dimension array) is correct.
>>
>> Use of array_push looks fine.
>> You could use syntax like $event['Event'][] = $line[3], but the result
>> would be the same.
>
>Thanks :-)
>
>My main problem though is how to get data out of the array.
>
>For example
>
>echo $event['Event'][$i] . "<br />";
>
>doesn't give anything - even if I have explicity put something into the
>array (for example
>
>$event['Event'][0] = "wibble";
>$event['Event'][1] = "wobble";
>$event['Event'][2] = "fibble";
>$event['Event'][3] = "fobble";
>
>for ($i = 0; $i < 4; ++$i)
> echo $event['Event'][$i] . " ... " . $i . "<br />";
>
>displays nothing other than " ... 0-3")
>
>Is this more likely to be me or the version of php I'm using?
>
>TTFN
>
>Paul
Have you tried [Event(1)]
--
Kev Wells http://kevsoft.topcities.com
http://kevsoft.co.uk/
ICQ 238580561
The older I get the faster I used to be.
[Back to original message]
|