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 changes I have to do in php.ini file for file uploading?
Which of the data type is compound datatype supported by PHP?
How does php serialize work?
Is php 5.6 secure?
What is difference between rest and http?
Tell me how can we get the error when there is a problem to upload a file?
What is the main difference between require() and include()?
Which function would you use to insert a record into a database in php?
Is strcmp case sensitive?
Are objects passed by value or by reference?
What are the correct and the most two common way to start and finish a PHP block of code?
What is $_session in php?
I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable
What does the expression exception::__tostring means?
Which function will you use to create an array?