Re: Loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gareth Williams wrote:


$result = mysql_query("SELECT name, description FROM table"); while ($row = mysql_fetch_assoc($result)) { echo "{$row['name']}<br />$row['description']";
that will throw errors.
echo "{$row['name']}<br />{$row['description']}";
would work, just like all of the following would also:
echo "$row[name]<br />$row[description]";
echo $row['name']."<br />".$row['description'];

and a couple of others


}

On 14 Dec 2004, at 16:52, Steve Marquez wrote:

Greetings. I am trying to display looped information from a MySQL database
in a PHP file.


Loop

$name (witht a br />) then
$description

End of loop

I would like to loop the multiple variables rather than put all the
variables into a single variable with an array. I can not figure out how to
do this.


I have very little knowledge of PHP but am learning. Let me know if more
information is needed.

Thank you for any help.

--
Steve Marquez
smarquez@xxxxxxxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux