php - How can I translate "select from this variable to this variable only" into a code? -
i have 3 variables here.
$first= 'start'; $second = 'end'; $testvar = 'start here , here until end more more more strings here';
how can search $testvar if contains start , end strings, , want post start end string only.
another way using substr() , strops()
substr($testvar,strpos($testvar,$first),strpos($testvar,$second)+3)
Comments
Post a Comment