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
Which is used to maintain the value of a variable over different pages?
What is polymorphism in oop php?
Explain what is the difference between for and foreach?
What is meant by session in php?
Is strcmp case sensitive?
What is the difference between $name and $$name?
What is a php certification?
How to support multiple-page forms?
What does odbc do in context with php?
What are the characteristics of php variables?
What is a namespace in php?
Tell me how is it possible to return a value from a function?
How come the code works, but does not for two-dimensional array of mine?
Write a statement to show the joining of multiple comparisons in php?
How many ways to include array elements in double-quoted strings using php?