alexville Posted April 2, 2009 Share Posted April 2, 2009 Is this possible? Thanks Freaks! Quote Link to comment https://forums.phpfreaks.com/topic/152311-solved-cut-off-first-29-letters-of-a-php-variable/ Share on other sites More sharing options...
Maq Posted April 2, 2009 Share Posted April 2, 2009 Do you mean the variable name or value? I hope you don't have a variable name that long... Quote Link to comment https://forums.phpfreaks.com/topic/152311-solved-cut-off-first-29-letters-of-a-php-variable/#findComment-799888 Share on other sites More sharing options...
alexville Posted April 2, 2009 Author Share Posted April 2, 2009 Do you mean the variable name or value? I hope you don't have a variable name that long... lol no the contents of it Quote Link to comment https://forums.phpfreaks.com/topic/152311-solved-cut-off-first-29-letters-of-a-php-variable/#findComment-799892 Share on other sites More sharing options...
redarrow Posted April 2, 2009 Share Posted April 2, 2009 http://uk2.php.net/substr <?php $word="fnffjjfkjfkdlfjklsfjsdklfjklfjerltjritgjreifjeierjmglmgrktgrtYgrtglkrtgOjytrjgirtjgirtgjgt"; echo " <br>current number letters ".strlen($word).""; $test=strlen(substr($word,29)); echo " <br> number of letters now $test"; echo "<br>result: ".substr($word,29).""; ?> Quote Link to comment https://forums.phpfreaks.com/topic/152311-solved-cut-off-first-29-letters-of-a-php-variable/#findComment-799895 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.