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

Explain how can we execute a php script using command line?

502


How to redirect https to http url and vice versa in .htaccess?

515


How check variable is set or not in php?

456


How does php sessions work?

520


Which software is used to run php programs?

522






How to retrieve the original query string?

569


What does $_env mean?

568


What is lazy loading in php?

507


Is facebook still written in php?

553


How php statement is different from php script?

536


Will react hooks replace redux?

509


Is strcmp case sensitive?

517


How to replace a text in a string with another text in php?

520


What are different types of Print Functions available in PHP?

528


Xplain is it possible to use com component in php?

532