|
Posted by Robert Cummings on 10/21/55 11:28
On Mon, 2005-10-03 at 18:08, John Taylor-Johnston wrote:
> >Use "foreach" to traverse the array and display each trolly entry nicely
>
> This might be cleaner? I'm not sure if I'm using while and list right,
> but somehting like that?
>
> $glquery = mysql_query($sql);
> while ($mydata = mysql_fetch_object($glquery)) {
>
> while (list($_SESSION['TrolleyContents'], $value) = $mydata->RNum)
> {
> echo "$mydata->RNum - $mydata->field1: $mydata->field2.";
> }
>
> }
If list() works for you it's fine. I don't really use it so not entirely
sure of it's functionality with respect to looping.
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
Navigation:
[Reply to this message]
|