PHP Using Substr() With Negative Length – String Function

<?
print substr('This is a test. This is another test.',15,-2);
print substr('This is a test. This is another test.',-4,-1);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.