Hello - I am connecting to MySql and running a query. If I use a foreach loop, I can iterate over the results and have them print to screen. However, when I try the below everything is null!
How can I add the results of my MySql query to a php array?
$con=mysqli_connect("site", "user", "psasswr=ord", "db");
echo "Failed to connect to MySQL: " . mysqli_connect_error();
$sql="SELECT * FROM test LIMIT 10";
$result = mysqli_query($con,$sql);
but what this prints is: