stuart7398 Posted March 22, 2008 Share Posted March 22, 2008 Hi. I'm looking to show and hide data. My site shows various profiles of people and I want to show their contact details with the last 3 letters or numbers using an '*' When a new member joins the site they can then obtain the full contact details without the '*' I just need pointing in the right direction. thanks. Link to comment https://forums.phpfreaks.com/topic/97368-show-hide-data/ Share on other sites More sharing options...
BlueSkyIS Posted March 22, 2008 Share Posted March 22, 2008 $full_name = "John Testerverde"; $hidden_name = substr($full_name, 0, -3) . "***"; echo $hidden_name; Link to comment https://forums.phpfreaks.com/topic/97368-show-hide-data/#findComment-498236 Share on other sites More sharing options...
redarrow Posted March 22, 2008 Share Posted March 22, 2008 verry nice code didnt even think about addind a caternation of xxx on the end very good coding.... very good short hand for str_repalce i say..... Link to comment https://forums.phpfreaks.com/topic/97368-show-hide-data/#findComment-498237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.