Need help dealing with emojis (I think?) in PHP strings

34 Views Asked by At

The code below yields this result in https://php-play.dev/ � and I think the same or similar in my actual web app. How do I extract and use emojis in PHP?

<?php
// example code
$bod = "";
$c = $bod[0];
echo $bod."<br>";
echo $c."<br>";

I am expecting to see the first emoji character instead of the white-question-mark-in-black-diamond character.

0

There are 0 best solutions below