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
Tell me what is the default session time in php?
What is the use of $_server and $_env?
Is overloading possible in php?
What are session variables in php?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
Explain me what is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
armstrong number by using php while number is given by the keyboard.?
Tell me what is needed to be able to use image function?
What difference between require() and require_once()?
What is local variable in php?
Is php 7.0 stable?
How do I expire a php session after 30 minutes?
What's the output of the ucwords function in this example?
Is it more secure to use cookies to transfer session ids?
What is different between software and app