Is there a way I can find a value in an array from a regular expression value?
I have an array of users and am trying to call the user in the array from the regular expression but am failing. I thought I'd asked this in the past but can't find it with the search.
I think the $1 is being interrupted as a php variable which I don't want it to be.PHP Code:$pattern = '/class="user">(\d+)<\/td>/';
$replace = "class=\"user\">$user[$1]</td>";
$user = preg_replace($pattern, $replace, $pending_tasks);



Reply With Quote

Bookmarks