You are here: Re: another question: foreach() « All PHP « IT news, forums, messages
Re: another question: foreach()

Posted by gerg on 05/09/06 10:38

gerg wrote:
> clipped

> there are three records in the DB. But the form ends up looking like this:
>
> <form action="someaction" method="somemethod" name="somename>
> <selcect name="MS">
> <option value="123456">123456</option>
> <option value="123456">123456</option>
> </select>
> </form>
>
> So it's only selecting the first record and echoing it twice.
>
> thanks in advance for any help.
>
> Greg

Ok, on further exploration, the array that's being fed to the foreach()
looks like this:

Array ( [0] => 123456789 [MS] => 123456789 )

So it's not selecting all the MS's from the orders table like it should.
Something wrong with my SQL? Should I not be using mysql_fetch_array?
I dont' get it. :(

Thanks again for your help.

Greg

 

Navigation:

[Reply to this 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

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