PHP String Substr ( String Str, Int Start_Pos [, Int Length] ) Reads Part Of String And Takes Minimum Of Two Parameters – String Function

<?
    $message = "Goodbye, Perl!";
    $a = substr($message, 1);    $b = substr($message, 0);
    // $b contains the full string because we started at index 0    $c = substr($message, 5);    $d = substr($message, 50);    $e = substr($message, 5, 4);    $f = substr($message, 10, 1);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.