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 $row in php?
How to break a file path name into parts?
Is empty in excel?
How to support multiple-page forms?
What should we do to be able to export data into an excel file?
How can you get the size of an image in PHP?
What does the php error 'parse error in php - unexpected t_variable at line x' means?
how to track no of users logged in?
How does session work in php?
How do you end a session in php?
Where do we use get and post?
How do http requests work?
How to execute a function in php?
Explain me the difference between include and require?
What is == and === in php?