ajax - return multiple json encoded array from the server -



ajax - return multiple json encoded array from the server -

i want know how can homecoming multiple encoded json array server

ex.

//client

$.ajax({ url: 'items-details.php', type: 'post', data: {member_id: 1}, datatype: 'html', success: function(responsetext) { } });

//server, items-details.php

//some code here

then, final output ex. itemsdata array , itemscategories array, utilize json_encode() on both array. how can homecoming both arrays client? know how handle echo() - treated client string

before, utilize

echo(json_encode(itemsdata));

then client parse .. how can homecoming multiple json encoded array: itemsdata , itemscategories

for example, create let's $response array, contain both $itemsdata , $itemscategories arrays.

// $itemsdata , $itemscategories defined here $response = array( $itemsdata, $itemscategories ); homecoming json_encode($response);

ajax json

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -