<?php
$str = "Africa Beautiful!";
echo substr($str, 0, 6); // Outputs: Africa
echo substr($str, 0, -10); // Outputs: Beautiful
echo substr($str, 0); // Outputs: Africa Beautiful!
?>
substr ( $string , $start , $length );
/**Returns the extracted part of string;
*or FALSE on failure, or an empty string
*/
Code Example |
---|
Php :: php echo variable |
Php :: laravel eloquent soft delete |
Php :: number format without comma php |
Php :: laravel show table columns |
Php :: php sort hight to low |
Php :: enum artisan codwe |
Php :: wordpress Warning: Cannot modify header information - headers already sent by |
Php :: bycrypt password php |
Php :: uppercase php |
Php :: how to remove keys in subarray php |
Php :: php get object class |
Php :: create a new project from cli laravel |
Php :: laravel routes return view in web.php |
Php :: htmlspecialchars in php |
Php :: increase php memory |
Php :: string match in php |
Php :: laravel 8 decimal |
Php :: laravel cache put array |
Php :: laravel set a session variable |
Php :: mysqli_connect php |
Php :: laravel multiple paginate |
Php :: submonth carbon |
Php :: wp_get_attachment_url |
Php :: concat in php |
Php :: json encode decode |
Php :: curl php loop |
Php :: php combine values of two arrays |
Php :: php array order alphabetically |
Php :: email or phone required in laravel |
Php :: laravel factory |