Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. $address1[] = array();
  2. foreach($records as $row) {
  3. $direccion = $row - > direccion;
  4. $city = $row - > city;
  5. // $address1[] = $row->address1;
  6. /*Si lo guardo de esta forma me guarda solo las direcciones sin la id*/
  7. $c_bpartner_location_id = $row - > c_bpartner_location_id;
  8. $c_bpartner_id = $row - > c_bpartner_id;
  9. $address1 = array("address1" => $row - > address1,
  10. "c_bpartner_location_id" => $row - > c_bpartner_location_id);
  11. }
  12. $data['result'] = array(
  13. 'direccion' => $direccion,
  14. 'city' => $city,
  15. 'address1' => $address1,
  16. 'c_bpartner_id' => $c_bpartner_id,
  17. 'c_bpartner_location_id' => $c_bpartner_location_id
  18. );
  19.  
  20. $.each(response.result['address1'], function(k, v) {
  21. alert('1');
  22. $('<option>').val(v.address1).text(v.address1).appendTo('#address');
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement