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...

write function of the sentence traversal passing the
parameter, e.g input:this is input sentence.
output:sentence input is this.

Answer Posted / vipul dalwala

$input = "this is input sentence";

$array = explode(' ', $input);

$output = implode(' ' , array_reverse($array));

print $output;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many open modes available when a file open in PHP?

1128


How can you execute php script from the command line?

965


How can you pass a variable by reference?

951


Which is the correct way to check if a session has already been started ?

947


What is difference between mysqli and mysql?

1011


Does php pass arrays by reference?

1038


Why framework is used in php?

941


Can we override static method in php?

1030


What are the advantages of triggers?

936


Explain the difference between urlencode and urldecode?

1004


Is php a framework?

910


Is nan in javascript?

920


Which parts of php are case sensitive?

870


What is difference between mysql_fetch_array and mysql_fetch_assoc?

909


Why do we use query?

884