
October 8th, 2012, 04:43 PM
|
|
|
Whoops, you gave the error, I scrolled past it.
It works for me:
php Code:
Original
- php Code |
|
|
|
<?php class Storm { public $StormName; public $StormID; public $Latitude = array(); //used to hold a list of positions public $Longitude = array(); //same as above} $aStorm = new Storm(); $aStorm->StormName = 'test'; //works! $aStorm->StormID = '4'; //works! array_push($aStorm-> Latitude, '23.4'); //does not work array_push($aStorm-> Longitude, '75.4'); //does not work
Result:
Code:
php -f storm.php
Storm Object
(
[StormName] => test
[StormID] => 4
[Latitude] => Array
(
[0] => 23.4
)
[Longitude] => Array
(
[0] => 75.4
)
)
What version of PHP is this?
__________________
I ♥ ManiacDan & requinix
This is a sig, and not necessarily a comment on the OP:
Please don't be a help vampire!
|