Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How many records can be stored in mysql table?

1004


What is difference between readonly and constant?

985


Is php faster than nodejs?

952


How do I sort numbers in php?

1041


How long should a session last?

961


Whether php supports microsoft sql server?

1033


How to generate a character from an ascii value?

1188


How escape single quotes php?

965


what is variable scope, which variables are accessible from where and what are "undefined variable" errors?

1077


Explain setcookie() function in php?

1013


Tell me what is the difference between unset() and unlink()?

1072


What is smarty?

956


What does it mean when it says the csrf token is invalid?

897


What is cookie and session in php?

945


Are php variables global?

1005