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

Answer Posted / dheeraj

Use explode()just notice the following code. here it splits
a string to parts and forms an array. Now u assign the array
element to a string.

<?php
$str = "Hello world. It's a beautiful day.";
print_r (explode(" ",$str));
?>

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is php oop?

714


What are the different ways to login to a remote server?

648


Is nan in javascript?

715


Why is php used for web development?

729


What types of loops exist in php?

759


Explain what does $_files means?

772


What are php keywords?

726


Name some of the functions in php.

701


explain php variable length argument function.

783


What is the array in php?

753


How is it possible to return a value from a function?

756


How to create and destroy cookies in php?

675


Do loops php?

746


How to convert one date format into another in php?

688


How long do php sessions last?

757