|
Posted by Matthew Fonda on 02/10/05 01:03
remove the semi-colon at after foreach(...)
On Wed, 2005-02-09 at 14:22, Mirco Blitz wrote:
> 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 [7] => MAX_FILE_SIZE [8] =>
> pdf [9] => dolink [10] => link [11] => erstam [12] => endless [13] => from
> [14] => until [15] => openbem [16] => history [17] => closedbem [18] => [19]
> => b [20] => br [21] => bw [22] => bay [23] => h [24] => hb [25] => hh [26]
> => mv [27] => n [28] => nw [29] => rp [30] => 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
>
> Ist not the first time i work with foreach. But it is the first time it just
> returns the last value.
>
> Do you have an idea why?
>
> Thank you very much
> Mirco Blitz
--
Regards,
Matthew Fonda
Navigation:
[Reply to this message]
|