mysql_fetch_array in PDO : <p>I changed my connection to PDO </p>

<pre><code>$DB = new PDO("mysql:host=".DBHOSTINT.";charset=utf8mb4;dbname=".DBNAMEINT, DBUSERINT, DBPASSINT);
</code></pre>

<p>I have the following code in the old "mysql_query"</p>

<pre><code>$result = mysql_query("SELECT * FROM menu ");
while ($row = mysql_fetch_array($result)) {

   echo '&lt;div class="cuisine-detail"&gt;'. $row["text"]. '&lt;/div&gt;';
   echo '&lt;/div&gt;';

}
mysql_free_result($result);
</code></pre>

<p>How I can transform this to the PDO way :</p>
