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
Tell me which function gives us the number of affected entries by a query?
Which is better #define or enum?
What is the meaning of symbol '$' in jquery?
Who developed php?
What is a controller in php?
Explain what is the difference between $var and $$var?
Why do we use hooks?
Why php is used with mysql?
When to use get and post request?
How cookies are trported from browsers to servers?
What does php exit do?
What is a php trait?
How to include a file code in different files in php?
What is the use of the function htmlentities?
What is php and features of php?