1substr ( $string , $start , $length );
2
3/**Returns the extracted part of string;
4 *or FALSE on failure, or an empty string
5 */
1<?php
2$str = "Africa Beautiful!";
3echo substr($str, 0, 6); // Outputs: Africa
4echo substr($str, 0, -10); // Outputs: Beautiful
5echo substr($str, 0); // Outputs: Africa Beautiful!
6?>