Reply to Re: accessing values from an array

Your name:

Reply:


Posted by ZeldorBlat on 11/18/05 05:02

>on page2.php, i can't figure out how to access the array. i want to
>print each element of the array on a seperate line. w/o all the other
>it would look something like:
>
>echo "$info[1]<br>";
>echo "$info[2]<br>";

Shouldn't it be:

echo $_SESSION['info'][0] . "<br/>";
echo $_SESSION['info'][1] . "<br/>";

Or, if you want a foreach loop:

foreach($_SESSION['info'] as $val)
echo $val . " was checked<br/>";

[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

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