1. Write a function to swap two values ?
$a = 10;
$b = 20;
echo $a, $b;
swap(); // If u want u can pass parameters
echo $a, $b; // It should print 20 , 10
Answer Posted / ajay
I checked the answer posted by Sunil. This answer is
correct,the only mistake he did that the program print the
output together as 1020,2010,not like this
10
20
20
10
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Which is better get or post method?
What is the use of preg_match in php?
What is a stored procedure in mysql?
What advance thing in php7?
How do http requests work?
What is the use of final class in php?
What is a base url?
What is the function file_get_contents() usefull for?
Is facebook still written in php?
Tell me how is it possible to know the number of rows returned in result set?
Is php secure?
What is the role of php?
Which function would you use to merge two arrays in php?
What are the different types of php variables?
What is Apache's configuration file typically called?