title: create dynamic FPDF with array
body: <p>I have an array that I want to loop through to create the output in FPDF and it doesn't run. If I change the value to the row number it works. what am I doing wrong and or what anm I missing. Here is the FPDF section.</p>
  
  <pre><code>for(var i=0; $i&lt;$numRows; $i++) {
  $pdf-&gt;Cell(30,7,'Stop No:',0,0,'L');
  $pdf-&gt;Cell(12,7,$data[$i]['data']['StopNumber'],0,0,'L');
  $pdf-&gt;Cell(160,7,$data[$i]['data']['Type'],0,0,'L'); 
  $pdf-&gt;Ln();
  $pdf-&gt;Cell(30,7,'Company Name:',0,0,'L');
  $pdf-&gt;Cell(85,7,$data[$i]['data']['LoName'],0,0,'L');
  $pdf-&gt;Cell(40,7,'Phone Number:',0,0,'R');
  $pdf-&gt;Cell(40,7,$data[$i]['data']['LoPhone'],0,0,'L');
  $pdf-&gt;Ln();
  $pdf-&gt;Cell(30,7,'',0,0,'L');
  $pdf-&gt;Cell(85,7,$data[$i]['data']['LoAddress'],0,0,'L');
  $pdf-&gt;Cell(40,7,'Reference No:',0,0,'R');
  $pdf-&gt;Cell(40,7,$data[$i]['data']['ReferenceNo'],0,0,'L');
  $pdf-&gt;Ln();
  $pdf-&gt;Cell(30,7,' ',0,0,'L');
  $pdf-&gt;Cell(55,7,$data[$i]['data']['LoCity'],0,0,'L');
  $pdf-&gt;Cell(10,7,$data[$i]['data']['LoState'],0,0,'L');
  $pdf-&gt;Cell(20,7,$data[$i]['data']['LoPostalCode'],0,0,'L');
  $pdf-&gt;Cell(40,7,'Notes:',0,0,'R');
  $pdf-&gt;Cell(40,7,$data[$i]['data']['LoNotes'],0,1,'L');
  $pdf-&gt;Cell(195,.5,'','B',1,'L');
  </code></pre>