How to replace a ‘different’ – with a ‘normal’ – in PHP?

I’m using WP-property (a wordpress plugin) and am trying to use a variable as link in a template. I’m using the following code:

<a href="<?php echo $property['download1link']; ?>" target="_blank"><?php echo   $property['download1tekst']; ?></a>

However, the link doesn’t work as the ‘-‘ is different. How can I fix this (/replace the – with a normal -)?

Read More

Output now (ndash):

http://ouwejan.hostbeats.com/wp%E2%80%93content/uploads/2012/07/NVM_Goed%E2%80%93gevoel%E2%80%93NVM_Label_fc11.jpg

Output as it should be:

http://ouwejan.hostbeats.com/wp-content/uploads/2012/07/NVM_Goed-gevoel-NVM_Label_fc11.jpg

Thanks.

Related posts

Leave a Reply

2 comments