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 / ramse
yes we can do this also.
But pass by reference allow in PHP5 not in PHP4.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
How do you parse and process html/xml in php?
Does php has a future?
What are the three classes of errors that can occur in php?
How do I stop php artisan serve in windows?
What is the use of "ksort" in php?
Which function would you use to read a line of data from a file in php?
Can we override static method?
What new features php7 has in store for us?
Do you know how to get the ip address of the client?
Explain me what is the use of 'print' in php?
Is json a string php?
What is isset and unset in php?
What is the function to count elements in an array in PHP?
What is the difference between get & post ?
Which is better session or cookie?