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

Why is node js better than php?

601


Are sessions stateless?

480


What is the best php version for wordpress?

517


Tell me which function gives us the number of affected entries by a query?

514


What is an associative array?

545






Explain what does the unlink() function means?

535


What is mysqli_real_escape_string?

520


Do while loops?

519


What is the purpose of the php empty function?

481


What is query string php?

523


What is difference between sql and php?

535


What is meant by session in php?

494


What is cookie and session in php?

495


Why use php artisan serve?

493


What are html entities?

497