so i am working on converting MySQL Connection MySQL database to MariaDB PHP PDO what can i use in place of while($res = mysqli_fetch_array($result)) in MariaDB PHP

Code:
  
<?php
		while($res = mysqli_fetch_array($result)) {		

			$stat=$res['trolleyID'];
			if($stat=="000000")
			{
				$color="color:red";
				$text="BAD READ";
			}
			else 
			{
				$color="color:green";
				$text="GOOD READ";
			}
            
            echo "<tr>";
			    echo "<td>".$res['datecol']."</td>";
			    echo "<td>".$res['timecol']."</td>";
			    echo "<td>".$res['trolleyID']."</td>";
			    echo "<td style='$color'>".$text."</td>"; 
			echo "</tr>";
		
		}
		?>
Thanks For any help