title: Applying custom font to table cell inside PHP echo
body: <p>I am currently working on a project which pulls in tables from a mySQL which are shown in a html table. Below you can see the code.</p>
  
  <pre><code>if (mysql_num_rows($result) &gt; 0) { 
      // yes 
      // print them one after another 
      echo "&lt;table cellpadding=1 border=1 width=100%&gt;"; 
      while($row = mysql_fetch_row($result)) { 
          echo "&lt;tr&gt;";  
                  echo "&lt;td&gt;"."&lt;center&gt;".$row[0]."&lt;/center&gt;"."&lt;/td&gt;"; 
  
          echo "&lt;td&gt;" .$row[2]."&lt;/td&gt;"; 
          echo "&lt;td&gt;" .$row[1]."&lt;/td&gt;"; 
          echo "&lt;td&gt;" .$row[3]."&lt;/td&gt;";  
          echo "&lt;/tr&gt;"; 
      } 
      echo "&lt;/table&gt;"; 
  } 
  </code></pre>
  
  <p>I need to change it to</p>
  
  <pre><code>if (mysql_num_rows($result) &gt; 0) { 
      // yes 
      // print them one after another 
      echo "&lt;table cellpadding=1 border=1 width=100%&gt;"; 
      while($row = mysql_fetch_row($result)) { 
          echo "&lt;tr&gt;";  
                  echo "&lt;td&gt;"."&lt;center&gt;".$row[0]."&lt;/center&gt;"."&lt;/td&gt;"; 
  
          echo "&lt;td&gt;" .$row[2]."&lt;/td&gt;"; 
          echo "&lt;td&gt;" .$row[1]."&lt;/td&gt;"; 
          echo "&lt;td&gt;&lt;font face="Georgia, Times New Roman, Times, serif"&gt;" .$row[3]."&lt;/font&gt;&lt;/td&gt;";    
          echo "&lt;/tr&gt;"; 
      } 
      echo "&lt;/table&gt;"; 
  } 
  </code></pre>
  
  <p>When I do this is throws back errors. I am doing this so the user sees a barcode which i have a font for.</p>
  
  <p>Am I doing this wrong? or is there another method which will work better.</p>
  
  <p>Thanks
  Ryan</p>