Help with regex code for table

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

Can you just paste what $file returns here i.e from the actual server. I've some problem accessing your site from my side.
kerna
Forum Newbie
Posts: 9
Joined: Wed Mar 07, 2007 6:52 am

Post by kerna »

dude81 wrote:Can you just paste what $file returns here i.e from the actual server. I've some problem accessing your site from my side.
When i print $file it just brings up the source for the http://www.sportinglife.com/football/pr ... table.html which basically just loads up exactly whats on that website.

Is that what you need to know?
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

Sorry, that is not what I was looking for. I just need the output of the server for $file on which it doesnt work.
kerna
Forum Newbie
Posts: 9
Joined: Wed Mar 07, 2007 6:52 am

Post by kerna »

dude81 wrote:Sorry, that is not what I was looking for. I just need the output of the server for $file on which it doesnt work.
<body>

Array
(
)

</body>
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

that means $file doesn't return anything.
kerna
Forum Newbie
Posts: 9
Joined: Wed Mar 07, 2007 6:52 am

Post by kerna »

Is it possible the regex pattern is wrong, and hence is matching nothing from $file?

Im getting confused here. I believe i have the right program running with preg_match or preg_match_all but dont udnerstand why its coming up with nothing. Must be something small im doing wrong
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

Ok try debugging regex, field by field i.e make a small regex for <tr> first , then the next field i.e<td>,<td align> and so from the existing regex.
Post Reply