Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. array_push($result, array('order_id' => $row[0],
  2. 'type' => $row[2],
  3. 'description' => nl2br($row[3]),
  4. 'amount' => $row[4],
  5. ));
  6.  
  7. "result":[{"order_id":"67","type":"HEADER","description":"Coca Cola","amount":null},{"order_id":"72","type":"TEXT","description":"French Fries","amount":null}
  8.  
  9. $.each(data.result, function(){
  10. $("tbody").append("<tr id='order_"+this['order_id']+"'><td>"+this['type']+"</td><td></td><td>"+this['description']+" </td><td>"+this['amount']+"</td><br>");
  11.  
  12. 'amount' => (is_null($row[4]) ? '' : $row[4])
  13.  
  14. foreach($row as &$value){
  15. $value = $value === null ? '' : $value;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement