php - Adding Variable in JSon Its Not Working -
i trying add together variable in json variable seek send email getting variable not variable value please take :
$request_json = '{ "type":"messages", "call":"send", "message":{ "html":"$salesmsgupdatemsg", }'; $request_json = '{ "type":"messages", "call":"send", "message":{ "html":"'.$salesmsgupdatemsg.'", }';
both codes not working if utilize
$request_json = '{ "type":"messages", "call":"send", "message":{ "html":"content text", }';
its working fine.
no thought happen.
thanks
you should follow jeoren advice because 1 day code will break.
$request = array ('type'=>"messages", 'call'=>'send', 'message'=>array( 'html'=>$salesmsgupdatemsg )); $request_json = json_encode($request);
php json
No comments:
Post a Comment