mysql - PHP mysql_fetch_array doesnt work? -


im trying fetch array out of mysql query result :

    $result = mysqli_query($con,"select * names");      if (!$result) {    echo "wrong"; }     var_dump($result);        //fetch data in loop       while($r=mysql_fetch_array($result, mysql_assoc)){          var_dump($r);        } 

var_dump($result); shows me there in :

object(mysqli_result)#2 (5) { ["current_field"]=> int(0) ["field_count"]=> int(6) ["lengths"]=> null ["num_rows"]=> int(2) ["type"]=> int(0) } 

but why never a:

var_dump($r); call

you mixing mysql_ functions mysqli_ functions

change fetch

$r = mysqli_fetch_array() 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -