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 cookie in php with example?
How to remove the new line character from the end of a text line in php?
What is api example?
How to initiate a session in php?
Is a number php?
How can I make a script that can be bilingual (supports english, german)?
Is php fully object oriented?
What is the use of 'print' in php?
What is the use of header() function in php?
What is csrf token in php?
What is the purpose of constant() function?
What is the importance of parser in php?
What is $_ get?
Do you know how to get the ip address of the client?
Which will start a session?