Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Does https prevent csrf?

868


What does the scope of variables mean?

892


What is stripslashes php?

916


How can we calculate the similarity between two strings?

948


Is php good for career?

939


How to find the position of the first occurrence of a substring in a string?

958


What is the function mysql_pconnect() useful for?

885


Explain the difference between require() and require_once()?

900


How can I use single quotes in single quotes in php?

840


What does a delimiter do in mysql?

991


What is prepare in php?

958


Which operator is used to concatenate two strings in PHP?

995


What's the output of the ucwords function in this example?

984


What is difference between print_r and echo in php?

850


What is cookie and why do we use it?

932