How to split this string :
56A19E6D77828
into format like this :
56A1 9E6D 7782 8
Are there any native PHP functions built for this?
You can use str_split()
$card = "56A19E6D77828";
echo join(" ", str_split($card, 4));
Outputs:
56A1 9E6D 7782 8