functions-online

substr

description

Returns the portion of string specified by the $start and $length parameters.

If $start is non-negative, the returned string will start at the $start'th position in $string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth.

declaration of substr

string substr ( string $string , int $start [, int $length ] )

test substr online










share substr

comments for substr

On 28. Dec 2017 14:32 Anna wrote:

Nice tool which clear my logic. I have also contributed in this topic, you would like it.

On 21. May 2014 13:27 butzi wrote:

@Matchendran: functions are not allowed within the textareas and input fields

On 21. May 2014 09:36 Matchendran wrote:

I tried to use some string functions in the $start and $length field, but its returning the value 0 instead of returning the correct value.Won't those fields take string functions as their input??

more comments for substr

There are some more comments for substr(). To see them all click here.

+

Leave your comment