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



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

Answer / 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

More PHP Interview Questions

What is use of header() function in php? What the limitation of header()?

0 Answers  


programm for factorial

1 Answers  


How about integrating an iKode Newsletter Server at my independent Wordpress blog site? I just wanna visitort can subscribe my blog when they like it and I can send some interested articles or events to them regularly to establish good relationship.

1 Answers   iKode,


How can you declare a constant variable in php?

0 Answers  


Explain array_uintersect()?

0 Answers  






What is the difference between characters 34 and x34?

0 Answers  


What is psr in php?

0 Answers  


What is regular expression in php?

0 Answers  


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

0 Answers  


What is array and function?

0 Answers  


Tell me how is it possible to remove escape characters from a string?

0 Answers  


Why using the htaccess file

2 Answers  


Categories