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
Navigation:
[Reply to this message]
|