Is your code erroring out? You can do it way simpler:
foreach($query as $row){
echo "<option>$firstname
}
Or whatever you need to do in the foreach, but the point is, if you
have an array, foreach is the best way to go
-Flynn
On Jul 7, 2009, at 7:39 PM, "rsimonus" <reidsim@gmail.
>
>
> I am trying to figure out how to get two columns into one combo. I
> have two columns. One column for first name and other columns for
> last name. I want first and last name in one combo. Here is my
> codes. Can someone tell me what went wrong?
>
> <?php
> include 'dbc.php';
>
> echo'<select name="categories"
> $res=mysql_query(
> if(mysql_num_
> else
> for($i=0;$i<
> $row=mysql_fetch_
>
> $both[full_name] = ($row[first_
>
> echo"<option>
>
> }
> echo'</select>
>
> ?>
>
>
[Non-text portions of this message have been removed]
Come to the monthly meetings at UTD in Richardson, TX.
Second Tuesday of every month.
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
0 Comments:
Post a Comment