Hi
I have the following code
<a href="snippet:add?code=<?php echo rawurlencode($snippet->snippet_content); ?>Save snippet</a>
where
'$snippet = <a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=&lt;?php the_permalink(); ?>" title="Submit this post to Digg">Digg this!</a>'
How could I get rawurlencode to replace "<"; to a "<"?
Many thanks in advance
rob
updated
using
<?php echo rawurlencode(html_entity_decode($snippet->snippet_content)); ?>
as suggested by the posters below, thankyou fixes the changing < ; to "<" but inserts \ throughout the snippet
<a rel=\"nofollow\" href=\"http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>\" title=\"Bookmark this post at Delicious\">Bookmark at Delicious</a>
the output I'm seeking is without the backslashes aswell
<a rel="nofollow" href="http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Bookmark this post at Delicious">Bookmark at Delicious</a>
cheers rob
FIXED
Thankyou to all who posted!
<?php echo rawurlencode(htmlspecialchars_decode(stripslashes($snippet->snippet_content))); ?>
works a charm,
many thanks rob