funsutton Posted August 31, 2008 Author Share Posted August 31, 2008 I actually didn't see the difference, so I switched it out. Thanks man. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 31, 2008 Share Posted August 31, 2008 No problem. Quote Link to comment Share on other sites More sharing options...
funsutton Posted August 31, 2008 Author Share Posted August 31, 2008 Hey, here is a separate string, similar to the other, however it has no F or C to denote the actual temperatures. How hard would it be to modify your preg_replace to only change the ones that are temps...and not the ones that are actual dates and times? mpdData['HMhour'].hour['0']=new mpdHMHrObj(new Date('2008','7','31','0','0','0'),'11','Few Showers','74','74','30','69','87','From S 2 mph'); The trick is, in this section "'Few Showers','74','74','30','69','87','From S 2 mph'", only the 74,74,69 are temps, and the others are percents. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 31, 2008 Share Posted August 31, 2008 See, the thing is that there's nothing special to denote those numbers as temperatures. I mean, you could write up a long-winded regex for every single field until you get the right ones, but I doubt you'd want to do that... @_@ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.