Hafiz Afnan Hafiz Afnan - 1 year ago 76
PHP Question

How to split up integer value?

how i can split up integer value like '3452' as 3 4 5 2 and assign each integer to an alphabet like 'B = 3', 'G = 4', 'Q = 5', 'U = 2' as we required and then merge these alphabets like 'BGQU' and return this string and use it outside of function. Please tell me if there is any option.

Answer Source

Firstly your code is incorrect (see your function has no ()) Try implode() like,

function get_value($split_code) {
    return implode('',$split_code);

or just use,

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download