Jump to content

phpchick

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by phpchick

  1. Yes that worked! That was actually the first thing I tried and it didn't work (then) but now it works. so yay I must have had a typo in there when I did it the first time. Thanks Mr Marcus.
  2. I have this super simple function function getstockstats($stocksymbol) { include_once('ii-prediction-log-widget/class.yahoostock.php'); $objYahooStock = new YahooStock; $objYahooStock->addFormat("snl1d1t1cvc1p2"); $objYahooStock->addStock("$stocksymbol"); foreach( $objYahooStock->getQuotes() as $code => $stock) { echo $stock[0]; } } when I use the function, I pass it a symbol like this getstockstats("aapl"); I want this line $objYahooStock->addStock("$stocksymbol"); to receive the variable (aapl), instead, its reading it as $stocksymbol I know there is a way to exit that but I can't for the life of me figure it out because it is so hard to explain that portion. Can someone help me? I've tried wrapping it in {} like this $objYahooStock->addStock("{$stocksymbol}"); but that did not work either. Thank you!! <3
×
×
  • 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.