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
List some features of php that are deprecated in php
Will a comparison of an integer 12 and a string "13" work in php?
Explain me is multiple inheritance supported in php?
Tell me how can we get the error when there is a problem to upload a file?
How do I stop a php script?
What does $_env mean?
How to submit form without a submit button.
What is a model in php?
Explain how is it possible to set an infinite execution time for php script?
What is __ construct in php?
What is xss in php?
Can you convert php to html?
What backslash character will match whitespace?
What is php and sql used for?
What are different types of runtime errors in php?