Reply to Re: Recursively cycling through an menu array

Your name:

Reply:


Posted by Ciaran on 12/07/07 01:35

Hi Arne,
If the data is coming from an SQL query, the usual way is to use the
mysql_fetch_array function as a while loop like so:

while($data=mysql_fetch_array($mysql query result)){
echo "<ul>".$data['Title']."</ul>";
etc...
}

If you have to use the array you created instead of the fetch
function, you can use similar code inside a foreach loop like so:
(presuming it's a 3d array you're working with)

foreach($arrayname as $data){
echo "<ul>".$data['Title']."</ul>";
etc...
}

Hope that helps you out! Have a look at php.net for documentation on
the functions/loops mentioned.
Ciarán

[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

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