Replace Underscore with Blank Space
-
I am echoing a post meta key with the name property_type and this is outputting with underscores between the words. I am trying to remove these underscores using str_replace but I must have something wrong in my code as it is still putting the underscores in.
<?php $key="property_type"; echo get_post_meta($post->ID, $key, true ); $key = str_replace('_', ' ', $key);?>
Any help would be great.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Replace Underscore with Blank Space’ is closed to new replies.