So I'm trying to convert latin characters such as á, é, etc. into their non-latin transliterations (a, e, etc.) I know there is the following: PHP replacing special characters like à->a, è->e
But none of them seem to have helped... Here is what I have and the results they produce.
echo $this->data['last_name'];
$last_name = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $this->data['last_name']);
echo $last_name;
$last_name = mb_convert_encoding($this->data['last_name'], 'ISO-8859-1');
echo $last_name;
$last_name = iconv('UTF-8', 'ascii//TRANSLIT//IGNORE', $this->data['last_name']);
echo $last_name;
-----
Dérmenjian
D�rmenjian
D�rmenjian
D?rmenjian
Any idea what I'm doing wrong and potentially how to fix it? I could always just do a massive array, but I'd prefer a programmatic approach to this problem...
(Not sure it makes a difference, but we're using php 5.5)