Skip to content
Advertisement

Javascript function in PHP fromCharCode()

var test = String.fromCharCode(112, 108, 97, 105, 110);
document.write(test);

// Output: plain

Is there any PHP Code to work as String.fromCharCode() of javascript?

Advertisement

Answer

Try the chr() function:

Returns a one-character string containing the character specified by ascii.

http://php.net/manual/en/function.chr.php

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement