php substr return part of a string

good if you want to .. return part of a string


$string = "My String";
$string_sub = substr ( $string , $start = 0, $length = 2 ] );
echo $string_sub; // this should echo "My"

Other Items in php
Page Views

This page has been viewed 142 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
I'm a big believer in energy and the secret and that sort of thing.