I'm trying to output the unicode for a character as a the return type for my PHP function, but when I call the function in practice it just outputs the code without the "0x" rather than a symbol. However, if I explicitly state the unicode in my HTML, it outputs the symbol fine. Below is a simplified version of my code. Why is this happening?
In a PHP file displaying a table:
<td><?php echo verifyMatch($a,$b) ?></td>
In my function in another file:
function verifyMatch($_a,$_b){
$_output = null;
if (checkCondition()){
$_output = 0x2714;
// unicode for tick
} else {
$_output = 0x2718;
// unicode for cross
}
return $_output;
}