I am trying to write the below script inside my php file. Its giving me error. Something is wrong pls help.
There seems to be problem with syntax, in echo
<?php if(!empty($alter_details)){ $total = 0;?> <?php foreach ($alter_details as $list) {?>
<tr>
<td><?php echo $list->status?></td>
<td>
<?php if($list->order_status == 5){echo <a href="javascript:void(0);" onclick="add_alter_details('<?php echo $list->details_id;?>')">Alter</a>;}elseif($list->order_status == 0){echo "Pending";}?>
</td>
</tr>
<?php $total = $total + $list->amount; } ?>
<?php } ?>