note 24047 added to function.mysql-fetch-row

From: Date: Mon, 05 Aug 2002 12:00:42 +0000
Subject: note 24047 added to function.mysql-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-34296@lists.php.net to get a copy of this message
i would like to note that the following works well, except the html formating needs some work :) <?php $db=mysql_connect("localhost","username","password"); $result=mysql_db_query("database","SELECT * from table_name"); $rowcount=mysql_num_rows($result); while($ar=mysql_fetch_row($result)){ for($i=0;$i<count($ar);$i++){ echo($ar[$i]); echo(">br<"); } } mysql_close($db); ?> reverse the >br< for your break -- http://www.php.net/manual/en/function.mysql-fetch-row.php http://master.php.net/manage/user-notes.php?action=edit+24047 http://master.php.net/manage/user-notes.php?action=delete+24047 http://master.php.net/manage/user-notes.php?action=reject+24047

« previous php.notes (#34296) next »