Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying database info in a table

Status
Not open for further replies.

kawnz

Technical User
Jan 30, 2003
67
US
I am using PHP and have a text based dbase, so any MYSQL-specific code won't help me.

The database contains meeting information (venue, day, time, address, city, state, zip, etc. )

When I choose a state, I want it to display all the cities in that state.

Right now I have it at
[city1]
[city2]
[city3]
[city4]
[city5]
etc.

What I want to display:

[city1][city2][city3]
[city4][city5][city6]
etc.



Question One: how do I do that?

Question Two: how do I then complete the table, when the bottom row has, say only one [city]?


I know how tables work
But I want to know how to use those tables with calling up info from the dbase.

I am using the for statement to generate the cities, but I want to know how to then display those cities in a table form, and not just one under the other.

I am guessing I need to use another for statement, but not sure how to go about it or where to put it.

right now I pretty much have
<table>
for
<tr><td>$city</td></tr>
next
</table>

how do it get it to do
<tr><td>$city</td><td>$city</td><td>$city</td></tr>
 
hi kawnz
you'll probably get some better assistance in the PHP forum on your question.
forum434 _______________________________________________
[sub]{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }[/sub]
_______________________________________________
for the best results to your questions: FAQ333-2924
 
yea... I posted the first half in there first (wasn't specific enough), and they sent me here, then I posted the second half in there, and they answered me. Thanks.
 
[lol] maybe we all just wanted to give you the round trip of Tek-Tips. glad you got some help _______________________________________________
[sub]{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }[/sub]
_______________________________________________
for the best results to your questions: FAQ333-2924
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top