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
How to initiate a session in php?
How to write in a file in php?
Do while loops?
How do I display php errors?
What is the function file_get_contents() usefull for?
Does cors prevent csrf?
How send email in php?
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What php framework does wordpress use?
What is session in php why it is use?
Is php used anymore?
What does the expression exception::__tostring means?
Where is my php ini file?
What is good average session duration?
Whether it is possible to share a single instance of a memcache between multiple php projects?