Want to use iconv() on each item in an array and store them to a different array, then reassign the new array to the old one. Is this the correct way to do it?
foreach($partinfo as $key=>$item) {
$p[$key] = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $item);
}
$partinfo = $p;
You can get a string’s encoding by using
mb_detect_encoding:Source: http://php.net/manual/en/function.mb-detect-encoding.php
After your loop, just write another test loop that goes through and echoes out the return value and see for yourself.