Page 1 of 1

Replace and print characters retrieved from Mysql

Posted: Tue Aug 29, 2006 12:34 pm
by Tas Man
I have a php script that retrieves usernames from my mysql DB and displays that info on a page.
What I would like to do is replace the first 3 charaters of that username and replace it with 3 special charcters. I want to do this for security reasons. Does anyone have any code that would do this for me.
Thanks in advance.

Tas Man

Posted: Tue Aug 29, 2006 1:56 pm
by blackbeard

Code: Select all

substr_replace($origString, $newSubString, $startindex, $numCharactersToReplace);