php - eTrade array parameter with variable inside array -
in etrade php api allow ability fetch stocks symbol. works when manually typing in symbols array:
$request_params->__set('symbollist', array('aal', 'aapl', 'amzn'));
what have variable same exact string like:
$symbols = "'aal', 'aapl', 'amzn'"; $request_params->__set('symbollist', array($symbols));
but returns nothing. suggestions?
try instead:
$symbols = "'aal', 'aapl', 'amzn'"; $request_params->__set('symbollist', explode(', ', $symbols));
php arrays
No comments:
Post a Comment