Posted by lixuss on 08/05/06 12:51
just hint - try to ude var_dump or print_r to see the real content of
variable ;)
it helped me in this kind of problems many times
--
monomaniac21 wrote:
> //this loop doesnt work as intended, each row displays twice, once with
> a number as $key and again with key name as $key!?
>
> Any ideas why?
>
> $result = mysql_query("SELECT * FROM tbl WHERE id = '1' ");
> while($row = mysql_fetch_array($result)) {
>
>
> foreach ($row as $key => $value) {
>
> echo "<tr><td style='width:150px'>$key</td><td>$value</td></tr>";
>
> }
Navigation:
[Reply to this message]
|