jeffrydell Posted June 2, 2007 Share Posted June 2, 2007 This seems simple enough, but I haven't found an easy answer in reading posts here or documentation on the official php site. Thanks, in advance, for your patience. I have a users table which includes username, password, and permission level. In the admin screen of the website I would like to display a table of all the users, but don't want to display the passwords on that table ... instead I'd like to just display *s for each character. So if the password was "fish", the table cell would read ****, if the password was phish, the table cell would read *****, etc. I already know about the strlen() function which can tell me the length of the password string, but what do I use to tell php to "say" * once for each character in the string? Link to comment https://forums.phpfreaks.com/topic/53933-solved-character-replacement/ Share on other sites More sharing options...
penguin0 Posted June 2, 2007 Share Posted June 2, 2007 Simple question, why dont you leave the password row out all togather? Link to comment https://forums.phpfreaks.com/topic/53933-solved-character-replacement/#findComment-266657 Share on other sites More sharing options...
AndyB Posted June 2, 2007 Share Posted June 2, 2007 for ($i=0;$i<strlen($pass);$i++) { echo "*"; } Link to comment https://forums.phpfreaks.com/topic/53933-solved-character-replacement/#findComment-266660 Share on other sites More sharing options...
jeffrydell Posted June 2, 2007 Author Share Posted June 2, 2007 That IS an option - but I don't learn how to do the character replacement by just leaving out the Password. I'm trying to learn & grow a little. The other answer is "I am curious". Link to comment https://forums.phpfreaks.com/topic/53933-solved-character-replacement/#findComment-266662 Share on other sites More sharing options...
jeffrydell Posted June 2, 2007 Author Share Posted June 2, 2007 Oddly enough, Andy - that actually makes sense. Thanks! (Gotta learn to think like a super-genius ... I'll put that on my ToDo list for next week.) Link to comment https://forums.phpfreaks.com/topic/53933-solved-character-replacement/#findComment-266665 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.