March 3rd, 2000, 08:58 AM
Join Date: Feb 2000
Time spent in forums: < 1 sec
Reputation Power: 0
I apologize if this makes absolutely NO sense.
Ok I got a little problem, which I have a solution for but I would like to know if the is a better way.
I am making query to a mysql DB like so:
$query="Select * from DEMOTABLE";
Now I would like to make a table in HTML like
This does not work.
i get output as such.
column1 column1 column2 column2 column3 column3
becuase the keys for the $demoinfo array
are 'KEY0' 0 'KEY1' 1 'KEY2' 2
The keys are both the numeric and the alphenumeric. Doubling my output.
Now my stupid work around is to
add 2 next($demoinfo) commands. So I skip evry other column.
This works but there has to be another way.
Any help would be greate.
the above code does not acutally prodce duoble output. becase it will stop here
on the second pass becuase the second pass
the key=0, the numeric key, which is false.
meaning I actually only get 1 column printed.