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 htaccess? Why do we use this and where?
How to pass variables and data from php to javascript?
Is apache needed for php?
What are php data types?
Is it more secure to use cookies to trfer session ids?
What is var_dump function in php?
Can I write php code in html file?
What is the tags in PHP is not a valid way to begin and end a PHP code block?
Which database is best for php?
What is list in PHP?
Is session a cookie?
How cookies are transported from browsers to servers?
Where sessions stored in PHP?
What is the difference between print() and echo()?
Where are php configuration settings stored?