Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array_push($result, array('order_id' => $row[0],
- 'type' => $row[2],
- 'description' => nl2br($row[3]),
- 'amount' => $row[4],
- ));
- "result":[{"order_id":"67","type":"HEADER","description":"Coca Cola","amount":null},{"order_id":"72","type":"TEXT","description":"French Fries","amount":null}
- $.each(data.result, function(){
- $("tbody").append("<tr id='order_"+this['order_id']+"'><td>"+this['type']+"</td><td></td><td>"+this['description']+" </td><td>"+this['amount']+"</td><br>");
- 'amount' => (is_null($row[4]) ? '' : $row[4])
- foreach($row as &$value){
- $value = $value === null ? '' : $value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement