I have this table for example
+------+---------+------+
| id | item_id | type |
+------+---------+------+
| 1 | 2 | book |
| 1 | 1 | pen |
+------+---------+------+
I want retrieve all the data where id=1 in a php script, here is the code i used
<?php
$stat="select item_id, type from tb where id=1";
$query = mysqli_query($con, $stat);
$result = mysqli_fetch_array($query,MYSQLI_ASSOC);
print_r($result);
?>
the result is: Array ( [item_id] => 2 [type] => book )
and that is only the first row, how to retrieve all the rows in the php code?