Name
substr
Synopsis
$string = substr($string1, $regexp, $string2)
This finds the substrings of string1
that match
the regular expression regexp
. For each part of
the regular expression enclosed in parenthesis that matches, the
corresponding variable $1
, $2
,
$3
, etc. is set with the value of the match. The
value of string2
is returned with variables
(including $1
, $2
,
$3
, etc.) expanded.
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.