Name
tr
Synopsis
$string = tr($string, $list1, $list2)
Substitutes all of the characters in list1
that
exist in string
with the equivalent character in
list2
(e.g.,tr(
"Robby","oy","ai")
would return the
string “Rabbi”). The list of characters can contain a
range of characters separated with "-"
. For
instance, tr("e.e. cummings", "a-z," "A-Z")
will
return the string “E.E. CUMMINGS.”
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.