A query, someone knows what happens with variable $result
after doing $result->fetch_assoc()
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);