$data = array();
$i=0;
$row_count = 1;
foreach($valsl as $key2 => $value)
{
$cmn=$value['attributes']['COLUMN'];
$ptp = $value['tag'];
if ($cmn!='')
{/*echo $cmn."<br>";*/
$lt=$key2;
$data[$i]['column'] = $value['attributes']['COLUMN'];
$data[$i++]['column_value']=$valsl[$lt+1]['value'];
}
if (($ptp=='DATAROW')&($value['type']=='close'))
{
$data[$i]['column']="EOR";
$data[$i++]['column_value'] = $row_count++;
}
/*$vlu=$value['value'];
if($vlu!='')
{
$data[$i++]['column_value'] = $value['value'];
} */
}
$err = curl_error($soap_dol);
curl_close($soap_dol);
/* echo "<pre>";
print_r($data);
*/
$listingHTml='<div class="newview newview1">
<table id="landlord" class="display" width="80%" cellspacing="0">
<thead> <tr><th colspan="4" style="text-align: center; padding: 35px 0px;background:#007acc; color:#fff;text-transform: uppercase;font-size: 32px;"> Partner Orders</th></tr> ';
$listingHTml.='<tr>';
$i = 0;
while ($data[$i]['column']!='EOR')
{
$listingHTml.='<th>'.$data[$i++]['column'].'</th>';
}
/* $listingHTml.='<tr><th>Document No</th>
<th>Date Ordered</th>
<th>Description</th>
<th>Grand Total</th>';
*/
$listingHTml.='</tr></thead><tbody><tr>';
$sz=1;
$arr_size=sizeof($data);
foreach ($data as $listvalue)
{
if($listvalue['column']=="EOR")
{ $listingHTml.='</tr><tr>'; }
else
{ $listingHTml.='<td>'. $listvalue['column_value'] .'</td>';}
}
$listingHTml.='</tr> </tbody>
</table></div>';
echo $listingHTml;
}
else
{
header('Location: '.site_url().'/index.php/user-login');
}