note 97220 deleted from pdostatement.fetchall by danbrown

From: Date: Thu, 08 Apr 2010 19:12:17 +0000
Subject: note 97220 deleted from pdostatement.fetchall by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168041@lists.php.net to get a copy of this message
Note Submitter: sikuneh ---- A question: If you use $var->fetchAll() how would you get each column value. Bassically, I'm asking how one would get the equivelent of while($row=$preparedSQLStatement->fetch()) $col1 = $row['1']; ... Would you just define it as: $column1 = $var[0]; $column2 = $var[1]; and echo so you could change the way it shows on the page? echo "<p>".$column1; echo "<br /><h4>".$column2k Or would this not be the right statement for that function?

« previous php.notes (#168041) next »