I want to remove the first occurrence of <?
and the last occurrence of ?>
from a string using preg_replace, but no matter how I attempt to escape them, they always cause trouble.
PHP Code
$string = preg_replace('/<?/', '', $string);
$string = preg_replace('/?>/', '', $string);
What shall I write into the expression area?