CodeIgniter Forums
problem in to create json - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: problem in to create json (/showthread.php?tid=61917)



problem in to create json - ms313 - 05-30-2015

hi everybody

i new start work with codeigniter

i have problem in create and fillterin in json

i create json file but i can't strip_tags in json array

for example :
PHP Code:
$json strip_tags($temp);
     

$GLOBALS['data'] .= str_replace('  '' ',$json); 
but in codeignter it dosent work ;

PHP Code:
$this->output->set_content_type('application/json')->set_output(json_encode($data)); 

sorry i can't good speak engilsh Sad


RE: problem in to create json - gadelat - 05-31-2015

these two snippets do 2 totally different things