how can make use response of multidimentional array in ajax that response in php but use in javascript -


this response of ajax

array (     [0] => array         (             [name] => shoaib             [description] => shoaib frontend developer         )      [1] => array         (             [name] => jawad             [description] => jawad teacher         )  )  

above shown in console.log() how can handle in javascript

to use response ( multi-dimensional array ) php script in javascript use json_encode

$arr=array(); $arr[]=array('name'=>'shaoaib');  $json=json_encode( $arr ); header('content-type: application/json' ); echo $json; 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -