modifying a property of an object from a different class


Posted on 16th Feb 2014 07:03 pm by admin

I have 2 classes:
- Math
- Distance

in my math class, I have this line:
$distance = new Distance($this->query, $this->distances);
and this property:
public $special = array();

in my Distance class, when it is created, it has a method that is run called "parse". In the parse method, I want to modify the property shown above in Math, and add values to that array. How can I do this?

No comments posted yet

Your Answer:

Login to answer
309 Like 34 Dislike
Previous forums Next forums
Other forums

MySQL Primary key gap
Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (ht

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

Intrastat Report Config in ECC 6.0 - goods Movement in EU countries
Colleagues, need ur help to understand the changes require in ECC 6 standard Report configuration se

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

Casting Decimals in Oracle
This code worked as a query in DB2, but I am not sure what the syntax is for casting decimals in Ora

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash