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
What is the use of session and cookies in php?
What is xss and csrf?
What is explode() in php?
What is the use of mysql_fetch_array in php?
What is mvc php?
How do you define a constant?
How to change the principal password?
How to access a Static Member of a Class in PHP?
What is php mainly used for?
What is php crud api?
How to insert a line break in php string?
What is the best website to learn php?
How do I make a reset button in html?
What is the apache?
What is artisan in php?