I have an array which looks like this:
$a = [
0 => "0",
1 => "01",
2 => "00",
]
I want to replace single zeros with two zeros.
should look like this:
[
0 => "00",
1 => "01",
2 => "00",
]
I did this:
$newDigit = str_replace("0", "00", $splitDigit);
But it added everywhere 2 zeros:
[
0 => "000",
1 => "0001",
2 => "0000",
]
How do I solve this?