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

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Material xxx does not exist in plant xxx
Dear All,

I am working for a steel project which is repetitive manufacturing.

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

Where is my php.ini???
Hi

First off - apologies - i'm not a coder so this may sound very amateur.

I'm having

RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged verticall

Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I canno

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