regex - PHP string with special characters returns wrong answer -
i have these 2 lines in code:
$pattern = "/<p class=\"prev [first]*\"><a href=\"\/photography\/photo-of-the-day\/[^\/]+/"; echo $pattern;
and output just:
/
i tried this:
$pattern = '/<p class="prev [first]*"><a href="\/photography\/photo-of-the-day\/[^\/]+/'; echo $pattern;
but got same output. problem?
the problem was seeing output in browser , rendered browser , wasn't able see content. looking @ page source in browser way can see expected output.
Comments
Post a Comment