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

What is $row in php?

934


How to break a file path name into parts?

970


Is empty in excel?

969


How to support multiple-page forms?

956


What should we do to be able to export data into an excel file?

1024


How can you get the size of an image in PHP?

988


What does the php error 'parse error in php - unexpected t_variable at line x' means?

1092


how to track no of users logged in?

1020


How does session work in php?

999


How do you end a session in php?

1075


Where do we use get and post?

967


How do http requests work?

951


How to execute a function in php?

934


Explain me the difference between include and require?

919


What is == and === in php?

899