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

Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec

please fix the error
What is the error in the below code ???
Line number On/Off | Expand/Contract <?php

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

How can i steam a video on my PHP site? (non YouTube)
Basically I have a PHP site and don't want to give page rank to YouTube. I just want to stream a bas

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

PHP time (deadline within one week)
I have a column ['projdue'], which stores the deadline for a project.
I have PHP code and <

IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

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