santino Posted October 15, 2007 Share Posted October 15, 2007 i have a mysql and php website, some of the products have an _ underscore (epson_dx500 eg) . i display these items listed vert down the page, i want the data in the table to stay the same but when displayed on the page i want to hide the underscore. so if anyone cold help me i would be very grateful. thanks Quote Link to comment https://forums.phpfreaks.com/topic/73290-how-do-i-hide-characters-when-displaying-recordset-data/ Share on other sites More sharing options...
madspof Posted October 15, 2007 Share Posted October 15, 2007 Well i would do it by $string = "the var that has the _ in"; $rid = array("_"); str_replace($rid, "", $string); am npt sure if that would work as i cannt test it as am away from a php engine Quote Link to comment https://forums.phpfreaks.com/topic/73290-how-do-i-hide-characters-when-displaying-recordset-data/#findComment-369788 Share on other sites More sharing options...
jd2007 Posted October 15, 2007 Share Posted October 15, 2007 Hi, use this function: str_replace do like this: echo str_replace("_","","epson_dx500 eg"); note : the second argument should be "", make sure there's no space at all. Quote Link to comment https://forums.phpfreaks.com/topic/73290-how-do-i-hide-characters-when-displaying-recordset-data/#findComment-369789 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.