Passing arguments to an internal function via array_map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

I'm trying to convert the contents of an array from utf8 to utf16
(thanks for the headache MS Excel!).  I originally created a "user
function" that just ran the text through
mb_convert_encoding($text,'utf-16','utf-8') but now I'm wondering if I
can't just use the internal function directly.  Apparently it's more
complicated when the function requires arguments; I see example using
mysql_real_escape_string() on php.net.

My current attempt looks like this:

$clean = array_map('mb_convert_encoding', $dirty_arr, array('utf-16','utf-8'));

but I believe this is actually passing an array to
mb_convert_encoding() as the second argument rather than the 2nd and
3rd... Any ideas or am I chasing something that can't be done?

Marc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux