ukweb Posted June 14, 2007 Share Posted June 14, 2007 Hi there I'm developing an application for a client, and the current setup is that the entries in the database have underscores in instead of spaces, i'm persuming the previous developer did this for query reasons... basically its town names which have a space ie 'Colwyn_Bay' how do I substitute the _ with a space in the php echo code to display this as 'Colwyn Bay' and not Colwyn_Bay? I'm using <?php echo $searchquery_town; ?> any help received with thanks Quote Link to comment https://forums.phpfreaks.com/topic/55566-replace-underscore-_-with-space-how/ Share on other sites More sharing options...
Nhoj Posted June 14, 2007 Share Posted June 14, 2007 <?= str_replace('_', ' ', $searchquery_town); ?> Quote Link to comment https://forums.phpfreaks.com/topic/55566-replace-underscore-_-with-space-how/#findComment-274522 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.