title: Best way to access sqlite database in read mode using php
body: <p>Couple questions. Whats the best way to access a live .db file using sqlite to just read data? </p>
  
  <p>Secondly </p>
  
  <pre><code>$url = "data.db";
  
  try
  
  {
  
  $db = new PDO('sqlite:"$url"');
  
  ...
  </code></pre>
  
  <p>How can I correct this syntax so I can set the database url as a variable? If I must use a different method other than PDO because of question 1 please set it out with a variable for database url.</p>
  
  <p>Thanks</p>