hi im using the following code to display all the query results but its just giving me one
$do_search=mysqli_query($conx, "SELECT * FROM `vehicles` WHERE `$op` LIKE '%$search%'");
while ($row = mysqli_fetch_array($do_search))
{
echo $row['model'];
}
this code works fine giving me 2 results but when i use
$do_search=mysqli_query($conx, "SELECT * FROM `vehicles` WHERE `$op` LIKE '%$search%'");
while ($row = mysqli_fetch_array($do_search))
{
echo $row['id'];
}
it gives me only one result why?
output for first code:
xk-1 xk-2
output for second code:
2