If all zeros in str_replace will be replaced, how can you just let him replace them in the first number 0?

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

Apr.11,2021

does http://php.net/manual/zh/func.
study without looking at the documents


preg_replace

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34d34-2bf4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34d34-2bf4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?