newbtophp Posted August 1, 2010 Share Posted August 1, 2010 Hi, How would I do this, I'm trying to create a function to turn the octal (not sure whats its called exactly) input into its numberic representation, like so: <?php function octal_to_number($input) { //do something... return $number; } //would turn 0x17c into 380... echo octal_to_number('0x17c'); ?> Link to comment https://forums.phpfreaks.com/topic/209537-turn-octal-to-number/ Share on other sites More sharing options...
Alex Posted August 1, 2010 Share Posted August 1, 2010 octdec Link to comment https://forums.phpfreaks.com/topic/209537-turn-octal-to-number/#findComment-1093952 Share on other sites More sharing options...
newbtophp Posted August 2, 2010 Author Share Posted August 2, 2010 octdec Thanks, but did'nt seem to work, so i looked around and found this handy function -> hexdec() which worked /Solved Link to comment https://forums.phpfreaks.com/topic/209537-turn-octal-to-number/#findComment-1093969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.