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 do you parse and process html/xml in php?

957


Does php has a future?

872


What are the three classes of errors that can occur in php?

976


How do I stop php artisan serve in windows?

903


What is the use of "ksort" in php?

895


Which function would you use to read a line of data from a file in php?

973


Can we override static method?

918


What new features php7 has in store for us?

941


Do you know how to get the ip address of the client?

1047


Explain me what is the use of 'print' in php?

872


Is json a string php?

901


What is isset and unset in php?

981


What is the function to count elements in an array in PHP?

1036


What is the difference between get & post ?

1029


Which is better session or cookie?

912