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

Is empty java?

638


What is php stack?

607


What is php pathinfo?

662


What is isset and unset in php?

612


List some features of php that are deprecated in php

584






What is framework in php?

591


What is parent __construct ();?

629


Which php framework is best for security?

600


How do sessions work in php?

597


How can we encrypt the password using php?

634


Is it more secure to use cookies to trfer session ids?

611


What is the importance of "action" attribute in a html form?

642


What is php addslashes?

639


How to split a string into array using php?

626


Php code to find whether a number armstrong or not?

617