Reply to AW: [PHP] Foreach problem.

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация