preg_match that include string and variable

how can i make this work?? i have this variable $title[1] and wanna insert it in the preg_march like so

preg_match('/<a href="\\/m\\/'.$title[1].'_2011\\/.*/', $html_poster_link, $poster_link)

this doesnt work how can i make it work??

The code above will “work” in the sense of it being perfectly valid PHP, though clearly you’re not getting the intended result.

Please be a little more verbose than “this doesn’t work”. Describe the problem you’re having, its symptoms, what is going in (the values of your variables) and what’s coming out (if anything), and ideally provide a standalone code snippet so that we can run it and see the issue too, etc…

should this work??

$html_poster_link = file_get_contents('');
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??