php - Print all name of a db file -


i have problem. try print of name insert in database, output this:

array(2) { [0]=> string(7) "antonio" ["nome"]=> string(7) "antonio" } array(2) { [0]=> string(5) "paolo" ["nome"]=> string(5) "paolo" } array(2) { [0]=> string(7) "giorgio" ["nome"]=> string(7) "giorgio" } array(2) { [0]=> string(5) "jonny" ["nome"]=> string(5) "jonny" } array(2) { [0]=> string(7) "salmone" ["nome"]=> string(7) "salmone" } array(2) { [0]=> string(7) "paolino" ["nome"]=> string(7) "paolino" } array(2) { [0]=> string(8) "maurizio" ["nome"]=> string(8) "maurizio" } array(2) { [0]=> string(9) "gennarino" ["nome"]=> string(9) "gennarino" } array(2) { [0]=> string(6) "giallo" ["nome"]=> string(6) "giallo" } array(2) { [0]=> string(5) "leroy" ["nome"]=> string(5) "leroy" } array(2) { [0]=> string(11) "verdefoglia" ["nome"]=> string(11) "verdefoglia" } array(2) { [0]=> string(5) "bravo" ["nome"]=> string(5) "bravo" } array(2) { [0]=> string(5) "mondo" ["nome"]=> string(5) "mondo" } array(2) { [0]=> string(4) "soil" ["nome"]=> string(4) "soil" } array(2) { [0]=> string(8) "tiburzio" ["nome"]=> string(8) "tiburzio" } array(2) { [0]=> string(5) "potrt" ["nome"]=> string(5) "potrt" } array(2) { [0]=> string(4) "creo" ["nome"]=> string(4) "creo" } 

my code this:

$results = $database->query('select nome studenti'); while ($row = $results->fetcharray()){  var_dump($row); 

try using this:

$results = $database->query('select nome studenti'); while ($row = $results->fetcharray()) {     echo "name: ". $row['nome']; } 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -