I am trying to use this code:
<?php echo json_decode('"\uD83D\uDE00"'); ?>
When I am using this code I am getting this value :
But when I am trying to use this code using some variable like this:
<?php
$var = "\uD83D\uDE00";
echo json_decode('"{$var}"');
echo "{$var}";
?>
I am getting this as output:
{$var}\uD83D\uDE00
I have tried many things but nothing is working what can be the best way to do this.