note 81294 added to function.mysql-fetch-row

From: Date: Thu, 21 Feb 2008 16:00:50 +0000
Subject: note 81294 added to function.mysql-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-136355@lists.php.net to get a copy of this message
try it: <?php //example $esi=mysql_list_tables($db);$ris=mysql_fetch_row($esi); //$db has 10 tabs echo var_dump($ris); /*echoes only array(1) solution*/ while ($ris=mysql_fetch_row($esi)) echo $ris; /*output of all tabs why? debug: $ris=array("1_tab");$ris=array("2_tab");...$ris=array("n_tab"); $ris=false; in more we may have array or res like cols.*/ while ($ris=mysql_fetch_row($esi)) echo $ris[0]. "...". $ris[n]; /*example 3 cols per row. debug: $ris=array("col1_row1","col2_row1","col3_row1");...$ris=false; //if you want to have all result in an array: $ris=null; while ($ris[]=mysql_fetch_row($esi)); ?> hope it helps ---- Server IP: 80.241.173.254 Probable Submitter: 82.57.43.58 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-row.php Edit -- https://master.php.net/note/edit/81294 Del: integrated -- https://master.php.net/note/delete/81294/integrated Del: useless -- https://master.php.net/note/delete/81294/useless Del: bad code -- https://master.php.net/note/delete/81294/bad+code Del: spam -- https://master.php.net/note/delete/81294/spam Del: non-english -- https://master.php.net/note/delete/81294/non-english Del: in docs -- https://master.php.net/note/delete/81294/in+docs Del: other reasons-- https://master.php.net/note/delete/81294 Reject -- https://master.php.net/note/reject/81294 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136355) next »