Reply to Re: Populating <options> tag with SQL data?

Your name:

Reply:


Posted by cresh on 05/03/07 15:43

> <?php
>
> $r = mysql_query("select foo from baaz where foobar");
>
> while($row = mysql_fetch_assoc($r))
> {
> echo "<option value='{$row['foo']}'>{$row['foo']}</option>";
>
> }
>
> ?>
>
> I hope you get the idea.
>
> By the way, try to make your PHP blocks larger, and fewer in number - code
> is more readable that way.

Thank you! This is -exactly- what I was trying to do.
I'm sorry, next post I'll try to get the PHP blocks larger and easier
to read.

Thanks again, this worked perfectly.

Cresh

[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

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