I modified the code a little and used an if statement instead of a for statement - coming up with this code.
<?PHP
$content = file_get_contents('http://www.kitco.com/texten/texten.html');
$content = explode("\n",$content);
if($i=39) {
$thisLine = explode(' ',preg_replace('/(?:\s\s+|\n|\t)/', ' ',$content[$i]),4);
$prices[$thisLine[1]] = '$'.$thisLine[2];
}
if($i=40) {
$thisLine = explode(' ',preg_replace('/(?:\s\s+|\n|\t)/', ' ',$content[$i]),4);
$prices1[$thisLine[1]] = '$'.$thisLine[2];
}
if($i=41) {
$thisLine = explode(' ',preg_replace('/(?:\s\s+|\n|\t)/', ' ',$content[$i]),4);
$prices2[$thisLine[1]] = '$'.$thisLine[2];
}
if($i=42) {
$thisLine = explode(' ',preg_replace('/(?:\s\s+|\n|\t)/', ' ',$content[$i]),4);
$prices3[$thisLine[1]] = '$'.$thisLine[2];
}
?>
Then I add it to my html that I want to display:
<font><marquee border="1" width="400" height="20" bgcolor="#000000" scrolldelay="10" scrollamount="1"
align="middle" style="background-color: #000000; color: #FFFFFF; font-weight: bold;"><?PHP print_r($prices);?> <?PHP print_r($prices1);?>
<?PHP print_r($prices2);?> <?PHP print_r($prices3);?> </font>
Now the only thing I need to do is figure out a way to remove the Array ( [] ). Is there anyway to just display Gold - $xxxxx - instead of Array ([Gold] => xxxx) ?? Any help would that would be unreal. I've been googling for last 4 hours but can't seem to figure it out.