str_replace(substr($_SESSION["phone"], 0, 1), "+64", $_SESSION["phone"]);
assuming that I am 0111012123
, he will be replaced by
+ 641111612123
gets the first zero, but str_replace will change all 0
to + 64
.
what a pain in the neck