I have tried too many processes to remove the question mark diamond sign from my string value, but it did not work. In my PHP while I have displed some description, it displayed a question mark diamond sign with my string. This is my code
echo $data['description'];
Output: ExtremeSwitching 5520 24 1Gb/10Gb SFP+ ports 2 stacking/QSFP28 1 unpopulated VIM slot includes 2 fan modules 2 unpopulated modular PSU slots.� Includes 1 year XIQ Pilot Cloud subscription.
You can see a question mark diamond sign attached to my result. I also tried with set charset UTF-8 meta tag, but no successful result.
<meta charset="UTF-8">
How can I remove it?
I have got the successful result of applying this code, you can use this code to remove the question mark diamond sign from your string.
Apply it:
<?php $description = preg_replace('/[x00-x1Fx7F-xFF]/', '', $data['description']); echo $description; ?>
Output: ExtremeSwitching 5520 24 1Gb/10Gb SFP+ ports 2 stacking/QSFP28 1 unpopulated VIM slot includes 2 fan modules 2 unpopulated modular PSU slots. Includes 1-year XIQ Pilot Cloud subscription.
I hope it will be helpful for you.