title: PDO - Changing old mysql_fetch_object
body: <p>I have a small problem by using PDO instead of <code>mysql_fetch_object</code>.</p>
  
  <p>I tried to find something to replace it but nothing seems to work.</p>
  
  <p>First my link is done :</p>
  
  <pre><code>$link = new PDO('mysql:host='.$local.';dbname='.$nomBase.'', $user, $password, $pdo_options);
  </code></pre>
  
  <p>Here is my code :    </p>
  
  <pre><code>while($row = mysql_fetch_object($result)){
  $data1=$row-&gt;nickname;
  $data2=$row-&gt;id_contact;
  echo ("&lt;option ");
  if ($handled==$data2) { echo ("selected "); } 
  </code></pre>
  
  <p>Thanks for your help</p>