phpstringstrtr

Strtr requires an array as the second argument?


I am calling code like

strtr($somevars['thisvar'], "abc")

Where $somevars['thisvar'] contains a string.

And it's giving me

Warning:  strtr() [function.strtr]: The second argument is not an array

Why?


Solution

  • Warning: strtr() [function.strtr]: The second argument is not an array

    strtr != strstr

    see: http://docs.php.net/strtr