Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get string between two strings

$str = 'before-str-after';
if (preg_match('/before-(.*?)-after/', $str, $match) == 1) {
    echo $match[1];
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #string #strings
ADD COMMENT
Topic
Name
8+9 =