Gayner Posted August 29, 2009 Share Posted August 29, 2009 Ok.. I let's say I have a Value called: jukiliazeidnfuf but i want to put a function around it so it will be the first 8characters show up possible ? thx Link to comment https://forums.phpfreaks.com/topic/172379-php-letter-format-easy-fix-for-smart-people/ Share on other sites More sharing options...
oni-kun Posted August 29, 2009 Share Posted August 29, 2009 Very simple function.. Here you go. $text = "12345678910"; $var = substr($text, 0,; echo $var; //outputs 12345678 Look up substr for more info on the function. You can even go as simple as: $text = substr($text, 0,; Link to comment https://forums.phpfreaks.com/topic/172379-php-letter-format-easy-fix-for-smart-people/#findComment-908865 Share on other sites More sharing options...
Gayner Posted August 29, 2009 Author Share Posted August 29, 2009 Very simple function.. Here you go. $text = "12345678910"; $var = substr($text, 0,7); echo $var; //outputs 1234567 Look up substr for more info on the function. Oh snap epic!!! Thanks alot !!! hahaah this is so cool i love ppHpp Link to comment https://forums.phpfreaks.com/topic/172379-php-letter-format-easy-fix-for-smart-people/#findComment-908866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.