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
What is php routing?
How to get the number of characters in a string?
Which function is used in php to delete a file?
How do you define a constant in php?
What are the disadvantages of php?
How can you execute php script from the command line?
Explain me how failures in execution are handled with include() and require() functions?
Explain me differences between get and post methods?
How to redirect https to http url and vice versa in .htaccess?
What is a PHP Filter?
What are the characteristics of php?
How do you call a constructor for a parent class?
Explain a resource?
What is htmlentities function in php?
What is the capacity of mysql database?