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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -