|
Posted by Mirco Blitz on 02/10/05 01:18
Oh damn I am dumb thank you. That it was.
-----Ursprüngliche Nachricht-----
Von: Mikey [mailto:frak@totalise.co.uk]
Gesendet: Donnerstag, 10. Februar 2005 00:07
An: php-general@lists.php.net
Betreff: RE: [PHP] Foreach problem.
> HI,
> I am really confused.
> I have an array, that looks like this:
>
> print_r($elementsarr) = Array ( [0] => knr [1] => subject [2] => title
> [3] => kat [4] => pages [5] => access [6] => dofile
[snip]
> => s [31] => sa [32] => sh [33] => sn [34] => t [35] => bund )
>
> Now i try to work with this array in a foreach.
>
> foreach($elementsarr as $key=>$tmp);
> {
> echo "$key=>$tmp<br>";
> }
>
> Now the result of that is:
>
> 35=>bund
The array that you are trying to use foreach on is a numerically indexed
array (note the [0] => knr, etc) - this might explain your problem!
Mikey
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Navigation:
[Reply to this message]
|