Jump to content

preg_match that include string and variable


vin_akleh

Recommended Posts

  • 2 weeks later...

should this work??

$title[1]='Faster';
$html_poster_link = file_get_contents('http://www.rottentomatoes.com/search/full_search.php?search=Faster');
if (preg_match('/<a href="\/m\/'.$title[1].'-2010\/.*?/i', $html_poster_link, $poster_link))

if i am looking for

<a href="/m/faster-2010/" class="">Faster</a>

if yes then why it is not working for me??

****************disregard the last post please***********************

should this work??

$title[1]='faster';
$html_poster_link = file_get_contents('http://www.rottentomatoes.com/search/full_search.php?search=Faster');
if (preg_match('/<a href="\/m\/'.$title[1].'-2\/.*?/i', $html_poster_link, $poster_link))

if i am looking for

<a href="/m/faster-2010/" class="">Faster</a>

if yes then why it is not working for me??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.