Tazz Posted November 3, 2010 Share Posted November 3, 2010 I don't really know how to explain this, I saw once on some forum members signature, something like this : G = "\ x50 \ x72 \ 157 \ 144 \ x75 \ x63 \ 164 \ x20 \ x6c \ x69 \ 143 \ 145 \ 156 \ x73 \ 145 \ 040 \ x68 \ 141 \ x73 \ 040 \ x65 \ x78 \ 160 \. 151 \ 162 \ x65 \ 144 \ x2e \ x20 "+ E. That somehow translates into words, I know there is a PHP function to convert that, what is that code called and what is the PHP function? Link to comment https://forums.phpfreaks.com/topic/217634-code-conversion-in-php/ Share on other sites More sharing options...
ras1986 Posted November 3, 2010 Share Posted November 3, 2010 i think it's settype() Link to comment https://forums.phpfreaks.com/topic/217634-code-conversion-in-php/#findComment-1129821 Share on other sites More sharing options...
Tazz Posted November 3, 2010 Author Share Posted November 3, 2010 Hi ras1896 Thanks for the reply, but thats not what I was looking for. Link to comment https://forums.phpfreaks.com/topic/217634-code-conversion-in-php/#findComment-1129823 Share on other sites More sharing options...
ras1986 Posted November 3, 2010 Share Posted November 3, 2010 i found this by googling... not sure if this helps... For primitives just use (string)$var or print this variable straight away. PHP is dynamically typed language and variable will be casted to string on the fly. If you want to convert objects to strings you will need to define __toString() method that returns string. This method is forbidden to throw exceptions. Link to comment https://forums.phpfreaks.com/topic/217634-code-conversion-in-php/#findComment-1129826 Share on other sites More sharing options...
Tazz Posted November 3, 2010 Author Share Posted November 3, 2010 How does it work, how are the letters represented? Is there some sort of formula that I can use to figure out what code is assigned to which letter? Link to comment https://forums.phpfreaks.com/topic/217634-code-conversion-in-php/#findComment-1129837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.