code not working
$data['price']='£1';
print_r(json_encode($data));
result is
{"price":"null"}
i need result like
{"price":"£1"}
Try this :
$data['price']='£1';
print_r(json_encode($data));
£1 technically?You are not encoding same array.. you are storing value in $dat and encoding $data....
check your code ..
Try like this:
$data['price']="$1";
print_r(json_encode($data));
My result:
{"price":"$1"}
£with£Seems like an