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
What is the use of mysql_fetch_array in php?
What is the name of scripting engine in php?
How to increase the execution time of a PHP script?
How many types of php are there?
Tell me how can we define a variable accessible in functions of a php script?
Why triggers are used in mysql?
How does php work?
What is api laravel?
What are the Advantages and Application Areas of PHP?
What is the purpose of the '.myi' file extension? What do thes file contain?
What is session_register()?
What is a comment in php?
Name some of the constants in php and their purpose.
What are interfaces in php?
Can you specify the "new line" character in single-quoted strings?