RopeADope Posted February 4, 2011 Share Posted February 4, 2011 Hi all. I have a query that returns field names. I'm basically just trying to clean these field names up. Removing underscores, capitalizing letters, etc. The following is supposed to replace underscores with spaces, but it doesn't seem to work. Any help is appreciated. str_replace("_"," ",$fields->name); Link to comment https://forums.phpfreaks.com/topic/226699-str_replace-help-needed/ Share on other sites More sharing options...
Pikachu2000 Posted February 4, 2011 Share Posted February 4, 2011 Are you assigning the result of that to another variable? Link to comment https://forums.phpfreaks.com/topic/226699-str_replace-help-needed/#findComment-1169928 Share on other sites More sharing options...
RopeADope Posted February 4, 2011 Author Share Posted February 4, 2011 Oh gees. Of course it was a basic mistake, haha. Thanks for triggering that. I just adjusted it to the following... $fields->name=str_replace("_","",$fields->name); Link to comment https://forums.phpfreaks.com/topic/226699-str_replace-help-needed/#findComment-1169930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.