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 / nikunj kansara
$x=$a;
$a=$b;
$b=$x;
echo $a.",".$b;
Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What is the main difference between asp net and php?
What is basic php?
How does the identity operator ===compare two values in PHP?
How many columns can be added in a table in mysql?
Difference between array_combine and array_merge?
What are psrs?
Is not null mysql?
Does php support multithreading?
how retrive the video file in php using video tag
Is python similar to php?
What is an anti csrf token?
Are sessions stateless?
Why do we use php?
What is the use of hooks?
What is an abstract class in php?