When doing a MySQL query in PHP the extracted does not throw anything at you so you assign a variable the extracted one does not take it as null or as zero even though you have created the variable as I do to assign a value to a variable in php for empty queries? I leave the code
$consulta = mysqli_query($conexion, "SELECT tanquenum from tanque WHERE tanqedo = 'Ocupado'")
or die ("Error de consulta");
while ($extraido = mysqli_fetch_array($consulta)) {
echo $extraido['tanquenum'];
$p=$extraido['tanquenum'];
echo gettype($p)."<br>";
}
the value of $p
does not take any type of variable or is filled, I need to fill it to make another procedure when the query is empty