Thanks for the replies.
NogDog... I tried plugging that line in, and now I'm just getting the whole string. I'm not sure what's wrong.
Weedpacket... I really don't know anything about JSON, so I can't say for sure that it isn't. But what I'm doing is pulling mortgage rates from a table using:
$rates = file_get_contents("http://www.loansifter.com/rates2v2.aspx?uid=32828");
I found that there's a Javascript variable (I'll post the whole string at the bottom of this post) on that site that sets up the table, so I'm trying to extract the variable to use in PHP. I figure that I could use a regex command to extract what I need, but I just can't get my head around regex. Everytime I think I've got it, it doesn't work... very frustrating!
Thanks again for the replies... any other suggestions would be greatly appreciated.
Here's the full section of code that I'm trying to work with:
<script type="text/javascript">
var data=[{program:"30 Year Fixed $417,000",data:["4.750%","4.794%","0.08","360","$2175","$3189","CitiMortgage Correspondent","4.625%","4.710%","0.55","360","$2143","$3189","CitiMortgage Correspondent","4.500%","4.633%","1.13","360","$2112","$3189","CitiMortgage Correspondent"]},
{program:"15 Year Fixed $417,000",data:["4.125%","4.272%","0.56","180","$3110","$3189","CitiMortgage Correspondent","4.000%","4.241%","1.20","180","$3084","$3189","CitiMortgage Correspondent","3.875%","4.215%","1.89","180","$3058","$3189","CitiMortgage Correspondent","3.750%","4.245%","2.98","180","$3032","$3189","CitiMortgage Correspondent"]},
{program:"30 Year Fixed $729,750",data:["5.000%","5.042%","0.15","360","$2952","$3189","CitiMortgage Correspondent","4.875%","4.961%","0.66","360","$2910","$3189","CitiMortgage Correspondent","4.750%","4.890%","1.29","360","$2869","$3189","CitiMortgage Correspondent","4.625%","4.846%","2.26","360","$2827","$3189","CitiMortgage Correspondent","4.500%","4.743%","2.54","360","$2786","$3189","CitiMortgage Correspondent","4.375%","4.653%","2.99","360","$2746","$3189","CitiMortgage Correspondent"]},
{program:"20 Year Fixed $417,000",data:["4.500%","4.592%","0.32","240","$2530","$3189","CitiMortgage Correspondent","4.375%","4.561%","1.14","240","$2503","$3189","CitiMortgage Correspondent","4.250%","4.525%","1.94","240","$2476","$3189","CitiMortgage Correspondent"]},{program:"10 Year Fixed $417,000",data:["4.125%","4.267%","0.21","120","$4073","$3189","CitiMortgage Correspondent","4.000%","4.334%","1.12","120","$4049","$3189","CitiMortgage Correspondent","3.875%","4.401%","2.04","120","$4026","$3189","CitiMortgage Correspondent","3.750%","4.504%","3.15","120","$4002","$3189","CitiMortgage Correspondent"]}]
</script>