79232716

Date: 2024-11-28 05:51:46
Score: 0.5
Natty:
Report link

Modify your code like this to achieve the desired output:

 $data['animal'] = array();
    if($result->num_rows > 0) {
      while($row = $result->fetch_assoc()) {
       $data['animal'][] = $row;
      }
    } else {
        echo "0 result";
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Munish Kumar