PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The expression is not quite how i want it but i get an error if i change it. Since preg_match_all is a PCRE the syntax of the expression is different to normal reg ex's .
$links = array();
preg_replace_callback("/(<a ї^>]+>)(.*)(<\/a>)/i",
'callback_func', $web_page);
var_dump($links);
function callback_func($matches)
{
array_push($GLOBALS{'links'}, array($matchesї1],
$matchesї2], $matchesї3]));
return $matchesї0]; // So we don't alter the data
}
By the way, what's the source code that caused the error you mentioned?