alrht, I have this code <?php echo ltrim(str_replace(':','',wp_title(':',false)));?>.html"> In this I have removed colon ( : ) from wp_title and now I want to replace all the spaces in wp_title with dash too. Can you help me? If you can't get above words, see this Let wp_title is [ Hello: friend] current output- Hello friend.html I want it to be- Hello-friend.html Please help me
I am not a pro in php. I managed to use ARRAY but its creating extra dash. My output is [--Hello-friend.html] The two extra dashes before hello. How can I remove them?