In my codeigniter application I have a form in my views and I want to pass the responses received from this form in json format for further use. Can anyone guide me on steps to do the same please
1条回答 默认 最新
dop82210 2017-02-02 10:08关注This code might help
$arr=['name'=>'Ankita','education'=>'Graduate']; $json=json_encode($arr); var_dump($json);The result would be
string(40) "{"name":"Ankita","education":"Graduate"}"本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报