why the outputs are different in the while loop

PHP Code:

while($car_result1 = mysqli_fetch_object($car_connect1)){
<div class=”portfolio all” data-cat=”all”>
<? echo $car_result1->car_gear; ?>  // output is stick
<img alt=”Ay <?php if($car_result1->car_gear=’auto’){ echo “Auto”; } else { echo “Stick”; };  ?> “>
<? echo $car_result1->car_gear; ?> // Output is Auto 
}

car_gear field is filled as "stick" in the database. […]

Original post by plodos

Leave a Reply