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 Quote 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,; Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.