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 to remove an empty directory?

1083


Write a php script to get the largest key in an array?

1077


Which array function checks if the particular key exists in the array?

952


What is use of echo in php?

984


What happens if an expected input field was not submitted?

1036


What is the default time of cookie in php?

1045


How do you end a session in php?

1147


What are classes in php?

1151


Explain me what is the importance of "method" attribute in a html form?

973


What are the correct and the most two common way to start and finish a PHP block of code?

1111


What is the interface in php?

1091


What is the difference between file_get_contents() and file_put_contents() in php?

1222


How to call a php function from another php file?

1027


Do you know how to delete a file from the system?

1072


Tell me how is it possible to parse a configuration file?

982