This function operates on the parameter Str and converts all occurrences of the characters in the argument to the corresponding character in the parameter to, and returns the result.
If the arguments from and to are not the same length, the extra characters for these two arguments are ignored.
Example:
<?php
$ADDR = STRTR ($addr, "麧", "AAO");
?>
Call STRTR () can have only two parameters, and if there are only two parameters, then it will work in a new way: the argument from must be an array containing the string => string pairs, which will be replaced in the original string. STRTR () will look for the first possible alignment and will not attempt to replace the previously processed string.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.