Jump to content

class StockMarketAPI


LoneStarJack

Recommended Posts

I am trying to use class StockMarketAPI and have a problem with acessing the return variable.

 
 
foreach( $list_of_stocks as $sym){
    $StockMarketAPI = new StockMarketAPI;
    $StockMarketAPI->symbol = $sym;
    $StockMarketAPI->stat = 'price';

print_r($StockMarketAPI->getData());
The print_r line returns : AA Array ( [price] => 11.885 )

echo '<br>'. $sym. '    ' . $data['price']; 
I have tried everything I know to capture the "$data['price']

// add update database table here with the returned price
};
 
 
 

 

Link to comment
https://forums.phpfreaks.com/topic/285879-class-stockmarketapi/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.