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

Is empty function c++?

508


What is sql injection in php?

516


How do you identify independent and dependent variables in regression analysis?

479


Explain me how to include a file to a php page?

537


What does $_cookie means?

560






Can we learn php without html?

532


What is isset and unset in php?

525


What is zend studio for?

532


What is final class and final method?

560


What is the meaning of a final class and a final method?

524


What are helpers in php?

461


Which will start a session?

568


What is use of mysqli_query in php?

503


What is the use of mvc in php?

507


What are the options to transfer session ids?

573