hi , im using this code:
$regex = '#(href=")(http://[a-zA-Z0-9?&%.;:/=+_-]*)#';
$str2 = preg_replace_callback($regex,'shoveItInTheDatabase', $html_file);
function shoveItInTheDatabase($match) {
echo"<pre>";
print_r($match);
echo"</pre>";
}
which works , i want to additionally pass $user_client and $newsletter_id to this function.
e.g
function shoveItInTheDatabase($match,$user_client,$newsletter_id) {
echo"<pre>";
print_r($match);
echo"</pre>";
}
how do i pass the $user_client and $newsletter_id to this function with the preg_replace_callback, can't seem to figure out how to do it.