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 csrf token and how will you add csrf token in ajax?
What is csrf cookie?
What is htaccess? Why do we use this and where?
What is the difference between characters 34 and x34?
What is printf in php?
What is chrome logger?
What does $_ post mean in php?
What is the use of header() function in PHP? What the Limitation of HEADER()?
Require_once(), require(), include(). What is difference between them?
What does isset() function?
What is == and === in php?
What is cookies php?
When to use inquire vs enquire?
What is a php class?
Is empty in php?