html code is
<html>
<head>
123
</head>
<body>
some text
</body>
</html>
and php code is
$body='<html>
<head>
123
</head>
<body>
some text
</body>
</html>';
$ragid = "/<head> s*(.*?) </head>/i";
preg_replace($ragid, $head, $body);
and error is
Warning: preg_replace() [function.preg-replace]: Unknown modifier 'h'
i want to replace 123 by 123 {my code}
how it is possible ?
Use another delimiter, for example