str_replace_assoc()
public function str_replace_assoc( array $replace, string $subject )
This method is used to replace strings found in an associative array. This method was created from Wes Foster's strReplaceAssoc() function (source).
#
Arguments$replace
(array) (required) The associative array containing strings to search for (the array keys) and the strings to replace matches with (the values)$subject
(string) (required) The string to process.
#
ReturnThis method will return the passed string, but with any array key matches replaced by the associated values.