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

How to initiate a session in php?

1220


How to write in a file in php?

1005


Do while loops?

961


How do I display php errors?

971


What is the function file_get_contents() usefull for?

960


Does cors prevent csrf?

944


How send email in php?

976


Which methods should be used for sending an email using the variables $to, $subject, and $body?

1128


What php framework does wordpress use?

1016


What is session in php why it is use?

988


Is php used anymore?

971


What does the expression exception::__tostring means?

1010


Where is my php ini file?

1069


What is good average session duration?

1021


Whether it is possible to share a single instance of a memcache between multiple php projects?

1001