I have a multi-query MySQLi statement that uses multiple queries and when using var_dump
brings back the following:
var_dump of array:
array(1) { ["company"]=> string(8) "ffr3e456" ["high_1"]=> string(8) "8.32465" }
array(2) { ["company"]=> string(8) "gg8751hw" ["high_2"]=> string(7) "7.66574" }
The code I am using to display the array in a PHP file picks up the first array (i.e. the content of high_1
information but not the second.
code
if ($mysqli->multi_query($query)) {
do {
/* store first result set */
if ($result = $mysqli->store_result()) {
while ($row = $result->fetch_assoc()) {
for ($p=1; $p<=2; $p++)
{
echo number_format($row["high_".$p],2);
The HTML output shows the data from the first array but not the second. I am sure I am overlooking something, any advice and feedback welcomed.