Skip to main content
added 27 characters in body
Source Link
Alexey Palamar
  • 1.4k
  • 1
  • 10
  • 16
$result = mysqli_query($con, "SELECT * FROM Customers");   
$testwhile($row = json_encode(mysqli_fetch_assoc($result));
    $test[] = $row; 
print $test;json_encode($test);
$result = mysqli_query($con, "SELECT * FROM Customers");   
$test = json_encode(mysqli_fetch_assoc($result));    
print $test;
$result = mysqli_query($con, "SELECT * FROM Customers");   
while($row = mysqli_fetch_assoc($result))
    $test[] = $row; 
print json_encode($test);
Source Link
Alexey Palamar
  • 1.4k
  • 1
  • 10
  • 16

$result = mysqli_query($con, "SELECT * FROM Customers");   
$test = json_encode(mysqli_fetch_assoc($result));    
print $test;