Ok I got around it by the following, but now I have a new problem. I can not
get the two dimensional array working. I want to later be able to output a
variable like this $TickerData["IKN"] and it will output the associated
$Price.

  $StockURL =
"http://finance.yahoo.com/d/quotes.txt?s=xrx,ikn,danky&f=sl1&e=.txt";;
  $StockResults = implode('', file("$StockURL"));
  $Rows = split("\n", $StockResults);
  foreach($Rows as $Row) {
    list($Symbol, $Price) = split(",", $Row);
   $Symbol = str_replace('"', "", $Symbol);
   $TickerData = array("$Symbol"=>"$Ticker");
    }
  print_r($TickerData);
  echo $TickerData["IKN"]."<br>\n";




"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tuesday 03 February 2004 00:14, Christopher J. Crane wrote:
>
> >   $StockURL =
> > "http://finance.yahoo.com/d/quotes.txt?s=xrx,ikn,danky&f=sl1&e=.txt";;
> >   $StockResults = implode('', file("$StockURL"));
> >   $Rows = split("\n", $StockResults);
> >   foreach($Rows as $Row) { echo str_replace('"',"",$Row)."<br>\n"; }
> >   foreach($Rows as $Row) { str_replace('"',"",$Row); echo
$Row."<br>\n"; }
>
> str_replace() RETURNS the replaced string. It does not alter $Row.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> Spiritual leadership should remain spiritual leadership and the temporal
> power should not become too important in any church.
> - Eleanor Roosevelt
> */

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to