Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 15th, 2012  |  syntax: PHP  |  size: 0.39 KB  |  views: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. foreach($tabledata as $key => $value){
  2.         $i = 5;
  3.         echo "<table><tr><th>".$key."</th>";
  4.         foreach($value as $key2 => $value2){
  5.                 echo "<th>".$key2."</th>";
  6.         }
  7.         echo "</tr><tr>\n";
  8.         foreach($value as $key3 => $value3){
  9.                
  10.                 foreach($value3 as $key4 => $value4){
  11.                 if($i == 5){echo"<td>".$key4."</td>";}
  12.                         echo "<td>".$value4."</td>";
  13.                         $i++;
  14.                 }
  15.         }
  16.         echo "</tr>";
  17.         echo "</table>";
  18. }