Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. `foreach ($data as $key => $jsons) {
  2. $table ='<table class="'.$jsons['class'].'" border="1">';
  3. foreach ($jsons as $rkey => $rvalue) {
  4. if($rkey=='head')
  5. {
  6. $table.='<tr>';
  7. foreach($rvalue as $rvv)
  8. {
  9. $table.='<th>'.$rvv.'</th>';
  10. }
  11. $table.='</tr>';
  12. }else
  13. if($rkey=='rows')
  14. {
  15. foreach($rvalue as $rvv)
  16. {
  17. $table.='<tr>';
  18. foreach($rvv as $rv)
  19. {
  20. $table.='<td>'.$rv.'</td>';
  21. }
  22. $table.='</tr>';
  23. }
  24. }
  25. }
  26. }
  27. echo $table;`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement