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 get method in java?
What is the apache?
How do you define a constant in php?
What are the advantages and disadvantages of cascade style sheets?
Do you have to initialize variables in php?
How do I run a php script in windows?
Explain the changes in php versions?
What is the difference between $var and $$var?
How to select a database?
Explain NULL?
What is full form of PHP?
What is final class and final method?
What is use of in_array() function in php?
What is static in php?
Write a program using while loop in php?