User | Post |
windwaker
Posts: 468/1797 |
Wow, I didn't know that I was right XD.
Thanks.
Oooh, and thanks for the script; I needed to develop one like that anyway . |
Cellar Dweller
Posts: 180/269 |
You could write something like:
$res = mysql_query("SELECT * FROM footable"); $rows = 0; while ($omg[$rows] = mysql_fetch_array($res)) { $rows++; } mysql_free_result($res);
Then use $omg[row][column] to access data. The $rows varible will hold the total number or rows.
You may want to see http://www.php.net/manual/en/language.types.array.php#language.types.array.foo-bar. |
SyntaxLegend
Posts: 109/222 |
actually i think its exactly like that, or the other way around.. but looking in the acmlmboard code. It seems to use that alot. So yeah.. |
windwaker
Posts: 467/1797 |
Yes, lame title .
Here's something I've been looking for for a while and I haven't been able to find the answer .
When I fetch an array into a variable (let's say $omg), and I want to select a column, I go $omg[columnname]. Is there a way in which I can select a row like this, too? Like (doubt this works), but something like $omg[[row][column]]? |