codeexploiter Posted October 10, 2006 Share Posted October 10, 2006 Hi all,I am looking for any method/function using which i can convert a character into its corresponding 7 Bit ASCII value using PHP. For example ! (exclamation mark) has a 7 Bit ASCII value of !Is there any function or way that returns the 7 bit ASCII value of a character? Any help would be appreciated greatlyRegardsCode Exploiter Quote Link to comment https://forums.phpfreaks.com/topic/23509-converting-into-7-bit-ascii-format-in-php-is-this-possible/ Share on other sites More sharing options...
btherl Posted October 10, 2006 Share Posted October 10, 2006 Are you looking for the ord() function? Quote Link to comment https://forums.phpfreaks.com/topic/23509-converting-into-7-bit-ascii-format-in-php-is-this-possible/#findComment-106676 Share on other sites More sharing options...
codeexploiter Posted October 10, 2006 Author Share Posted October 10, 2006 hmmm yes it returns 33 which is the ASCII value of ! but in 7-bit ASCII format its value is [b]&33;[/b]. I wonder whether there is any other method that returns the exact 7 bit ASCII value rather than 33.Thanks for the help you provided. I hope to hear from u more about this in the future Quote Link to comment https://forums.phpfreaks.com/topic/23509-converting-into-7-bit-ascii-format-in-php-is-this-possible/#findComment-106710 Share on other sites More sharing options...
HuggieBear Posted October 10, 2006 Share Posted October 10, 2006 Try [url=http://uk.php.net/manual/en/function.htmlentities.php]htmlentities()[/url]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/23509-converting-into-7-bit-ascii-format-in-php-is-this-possible/#findComment-106712 Share on other sites More sharing options...
codeexploiter Posted October 10, 2006 Author Share Posted October 10, 2006 Not working it returns ! itself. I am unable to get the HTML equivalent of [b]![/b] which is [b]&33;[/b]Regardscode Quote Link to comment https://forums.phpfreaks.com/topic/23509-converting-into-7-bit-ascii-format-in-php-is-this-possible/#findComment-106722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.