how to get substring of string without using substr() function in php ????

Answer Posted / nadeem sartawi

Write a PHP function that Returns the part of string
specified by the start and length parameters.

Hint 1: the function accepts three parameters.
Parameter:Description
string :Required. Specifies the string to return a part of
start :Required. Specifies where to start in the string
length :Optional. Specifies the length of the returned
string. :Default is to the end of the string.
Hint 2: YOU ARE NOT ALLOWED TO USE THE "substr" FUNCTION.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is singleton pattern in php?

656


What new features php7 has in store for us?

749


What is difference between print and echo in php?

679


Why php is used with mysql?

764


What are php magic quotes?

677


Declare a new variable in php equal to the number 3;

696


What is a session in php?

741


What is the different between count() and sizeof() in php?

712


Why does php start with variables?

768


How is a session id generated?

733


What is the current php version?

769


Is rent a variable cost?

735


Are static variables final?

745


How is it possible to propagate a session id?

707


How do functions work?

734