INSERT INTO `table` (`column1`, `column3`) VALUES ('test', 'value')
INSERT INTO `table` (`column1`, `column3`) VALUES (?, ?)
INSERT INTO `table` set `column1` = 'test', `column3` = 'value'
$text = 'текст текст <img src="123.jpg"> текст <img src="123.jpg" alt="alternative"> текст <img title="Title" src="123.jpg"> текст <img title="Title" src="123.jpg" alt="Alternative Text">';
function replaceImg($matches)
{
$text = $matches[1];
$req = '|src=[\'"](.+)[\'"]|U';
preg_match($req, $text, $match);
return $match[1];
}
echo preg_replace_callback("|(<img.+>)|U", "replaceImg", $text);
?>