Re: preg_match_all() help
- From: question.boy@xxxxxxxxxxx
- Date: Thu, 4 Dec 2008 05:20:57 -0800 (PST)
This is what i have been trying to work with
preg_match_all('/Overall rating[<\/a>: <\/td>\n<td>](.*?)[% <\/td>]/
i', $page, $matches, PREG_SET_ORDER);
if (empty($matches)){
echo 'The rating could not be found';
} else {
foreach ($matches as $val) {
echo "Rating: ".$val[1] . "<br /><br />";
}
}
It apparently finds a match but never returns any value. I get
Rating: but no match?! What am I doing wrong?
QB
.
- References:
- preg_match_all() help
- From: question . boy
- preg_match_all() help
- Prev by Date: imagecreatefromgif & imagecolortransparent() ??
- Next by Date: Last working day of a month
- Previous by thread: preg_match_all() help
- Next by thread: Does php 5.2.5 support imap4rev1 search criterias
- Index(es):