Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `foreach ($data as $key => $jsons) {
- $table ='<table class="'.$jsons['class'].'" border="1">';
- foreach ($jsons as $rkey => $rvalue) {
- if($rkey=='head')
- {
- $table.='<tr>';
- foreach($rvalue as $rvv)
- {
- $table.='<th>'.$rvv.'</th>';
- }
- $table.='</tr>';
- }else
- if($rkey=='rows')
- {
- foreach($rvalue as $rvv)
- {
- $table.='<tr>';
- foreach($rvv as $rv)
- {
- $table.='<td>'.$rv.'</td>';
- }
- $table.='</tr>';
- }
- }
- }
- }
- echo $table;`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement