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 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 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. 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
Archived
This topic is now archived and is closed to further replies.