$string = preg_replace("/^41/", "0", $string);
/ and / = delimiters
^ = start of string (line in multiline mode)
So, it translates as, "replace a leading 41 in $string with 0".
..or try the ereg function, which has already been mentioned.
"Marc Bleuler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello all,
> Im trying to replace the first two digits (41) from a telephone no. with a
> (zero), like 41763334455 should end wit 0763334455. Anybody a idea howto?
> php programming experiance is not very high so if any body could provide a
> code example....
> thank you very mutch for help
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php