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 action hooks and filter hooks?
How to track user logged out or not? When user is idle?
What does addslashes do in php?
Explain the difference between require() and require_once()?
How to submit form without a submit button.
Define object-oriented methodology?
Which function can be used to delete a file?
what does this symbol mean in php?
What new features php7 has in store for us?
Tell me what does the scope of variables means?
Write a program to display reverse of any number?
How to get complete current page url in php?
What is the best way to avoid email sent through php getting into the spam folder?
Explain what are the different errors in php?
Write a program in php to check whether a number is prime or not?