title: How to properly insert php variables into table cells?
body: <p>I know this sounds a little confusing, but allow me explain further. </p>
  
  <p>I have a php function that prints the top of the table including the html tags as shown here:</p>
  
  <pre><code>function print_table_head (){
      echo "&lt;table&gt;
              &lt;thead&gt;
                &lt;tr&gt;
                  &lt;th&gt;URL Link&lt;/th&gt;
                  &lt;th&gt;Date Start&lt;/th&gt;
                  &lt;th&gt;Date End&lt;/th&gt;
                  &lt;th&gt;Total Budget&lt;/th&gt;
                  &lt;th&gt;Daily Budget&lt;/th&gt;
                  &lt;th&gt;Model Price&lt;/th&gt;
                  &lt;th&gt;Unit Rate&lt;/th&gt;
                  &lt;th&gt;Target Info&lt;/th&gt;
                  &lt;th&gt;Product&lt;/th&gt;
                  &lt;th&gt;Status&lt;/th&gt;
                  &lt;th&gt;Total Units&lt;/th&gt;
                &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;";
    }
  </code></pre>
  
  <p>I also have a function that closes the table with the html table ending tags as shown here:</p>
  
  <pre><code>function print_table_bottom(){
      echo "&lt;/tbody&gt;
            &lt;/table&gt;";
    }
  </code></pre>
  
  <p>Now, the table prints fine and dandy up to here. I get the correct table headings and every thing. But I have trouble having the table body and content to print. Here's what my main function looks like for printing the entire table including it's body and content:</p>
  
  <pre><code>function print_table ( $status, $model, $bid, $url, $target, $tBudget,$dBudget, $tUnits, $sMonth, $sDay, $sYear, $eMonth, $eDay, $eYear ){
      print_table_head();
  
      echo "&lt;tr&gt;
              &lt;td&gt;&lt;?php $url[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $sMonth[0] / $sDay[0] / $sYear[0];  ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $eMonth[0]; / $eDay[0]; / $eYear[0];  ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $tBudget[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $dBudget[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $model[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $targeting[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $product[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $status[0]; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php $tUnits[0]; ?&gt;&lt;/td&gt;
            &lt;/tr&gt;";
  
      print_table_bottom();
  
    }
  </code></pre>
  
  <p>Every time I call "print_table" function, it will print the top of the table with it's headings. But it doesn't print the table rows/cells. I'm not sure what I'm doing wrong. Can some one clear this up for me and tell me what I'm doing wrong? </p>
  
  <p>NOTE= I am using foundation-5. Not sure if that matters.</p>
  
  <p>Also, each of the variables used is an array (they all have 1 element in them... Yes I know, I COULD have not used an array for each variable, but I want to.)</p>
  
  <p>EDIT:</p>
  
  <p>As request by an commenter, I will provide the code that calls print_table:</p>
  
  <pre><code>&lt;?php
      //if the length of the array "status" is 1.
      if (count($status)==1){
        print_table ( $status, $model, $bid, $url, $target, $tBudget,$dBudget, $tUnits,$sMonth,$sDay,$sYear,$eMonth, $eDay, $eYear );
      }
      // please ignore this function. 
      else
  
        print_table_with_multiple_rows ( $status, $model, $bid, $url, $target, $tBudget,$dBudget, $tUnits,$sMonth,$sDay,$sYear,$eMonth, $eDay, $eYear );
    ?&gt;
  </code></pre>