I am trying to get "content" from this line:
$string = "start start content end";
with preg_match like this:
preg_match('/start(.*?)end/', $string, $matches);
echo $match[1];
but the problem $matches[1]returns start contentnot only contentbecause there are two startin $string(and possibly more)
How to get only contentpart with preg_match?
source
share