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 api laravel?
Tell me what is the use of "ksort" in php?
What is the special meaning of __sleep and __wakeup?
Why should I learn php?
What are the characteristics of php?
Why many companies are switching their current business language to php?
How many escape sequences are recognized in double-quoted strings?
What is the difference between array_pop() and array_push()?
How to delete cookie files on your computer?
What are the Advantages and Application Areas of PHP?
Which Scripting Engine PHP uses?
How to get ip address of a server in php?
How to create a mysql connection in php?
What are different types of errors available in Php?
What do you mean by core php?