You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php// If using an SQL statement like:$sql = "SELECT * FROM"...
// then you can assign array variables just fine as pulled from your $result->fetch_assoc() in your while loop.// However if your SQL is like:$sql = "SELECT my_var1 and my_var2 FROM"...
Resulted in this output:
// then using print_r() on the returned structure shows://Array//{// [my_var1 and my_var2] => 0//}
But I expected this output instead:
// normal array structure as shown with print_r()
PHP Version
php ver 8.2.28
Operating System
Debian 12 (bookworm)
The text was updated successfully, but these errors were encountered:
This isn't a bug, if you write "a and b" in the select classes then you're evaluating a boolean. You can put expressions in the select clause. You should use a comma.
Description
The following code:
Resulted in this output:
But I expected this output instead:
// normal array structure as shown with print_r()
PHP Version
php ver 8.2.28
Operating System
Debian 12 (bookworm)
The text was updated successfully, but these errors were encountered: