Page 1 of 1

replacing part of string

Posted: Wed Jun 28, 2006 7:12 am
by SuperFly
Hi everyone, I need some help:
I have a string looks like this:
Hello there this is my number 123456
and I would like it to be like this:
Hello there this is my number 123xxx
Just first 3 numbers are visible and the rest of it is replaced with xxx

does anyone have an idea how to do this? or where can i wint some tutorial

Regards

Posted: Wed Jun 28, 2006 7:30 am
by CoderGoblin
I would suggest you look at regular expressions especially preg_replace.