Samuel Loog Samuel Loog - 1 year ago 109
PHP Question

How convert specific number symbols to number

i have some string with next symbols: '14'. How i can convert this to integer?

print_r((int)'14'); // 0

Answer Source

You can use the function mb_convert_kana to convert full-width unicode characters

$str = '14';
echo (int) mb_convert_kana($str, 'n');
// 14
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download