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
What is laracast?
Tell me what is the use of explode() function?
Explain the differences between get and post methods?
What is php session start?
How to process the uploaded files?
Is php still in demand?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
Which php framework is in demand?
What is the difference between pop3 IMAP and MAPI?
What is php and how do you use it?
How to support multiple-page forms?
Why php is used?
What is difference between require_once(), require(), include()?
How can you increase the maximum execution time of a script in php?
What is difference between mysql_connect and mysqli_connect?