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 / ajay

I checked the answer posted by Sunil. This answer is
correct,the only mistake he did that the program print the
output together as 1020,2010,not like this
10
20


20
10

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between isset() and empty()?

894


How to send email using php script?

992


How can we increase execution time of a php script?

881


What is cookie in php with example?

891


What is var_dump function in php?

1017


What is meant by PEAR in PHP?

923


What is the difference between apache and tomcat?

959


What is the use of htmlentities in php?

915


What are the features and advantages of object-oriented programming in php?

878


Explain the different types of errors in php.

1010


How to concatenate two strings in php?

1006


Tell me how comparison of objects is done in php5?

880


Swap two variables value without using third variable in php ?

1003


How to randomly retrieve a value from an array?

1025


How to remove an empty directory?

986