Problem with fetch_assoc ()

0

A query, someone knows what happens with variable $result after doing $result->fetch_assoc()

    
asked by Chehin 11.01.2018 в 22:58
source

1 answer

0

When you want to concatenate what the function returns print_r () you may need to specify the second parameter as true since this will cause a String to be returned and the concatenation to be done or assigned to a variable, otherwise it will return true or 1 , it would be correct to use this in the following way.

echo "<p> Result antes" . print_r($result,true);
$row = $result->fetch_assoc(); //{
echo "<p> Result despues" . print_r($result,true); 
    
answered by 11.01.2018 / 23:22
source