HOME       >>       Programming

Php Iteration - Object Overloading Difference between iteration and overloading


i want to know that what is the difference between iteration and object overloading in PHP.
i read that both are same object overloading is old name of iteration, but i have doubt so please any one can help in this regard

what i know that :
* Iteration :- Loop the object
* used to Display property name and class value.
* foreach loop used : - only used in array and object iteration.
here i give example of iteration:

<?phpclass abc{var $user="Raju"; var $city="Delhi";var $age= 25;}$obj=new abc;echo "<table border=1>";echo "<tr><td> property Name </td><td> property Value </td></tr>";foreach($obj as $p=> $x){ echo "<tr><td> $p </td><td> $x</td> </tr>"; }echo "</table>";?>


property Name property Value
user Raju
city Delhi
age 25

every thing is fine but i am not fully understood this.

how it works. what is the behavior of this iteration. how we can say that it is object overload.



You know, veerumits, this is not really a tutorial. You are not really explaining things, you are rather like asking for an explanation.That's why I moved your topic here, where is most probably it's place.RegardsYordan


Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.