php's strip_tags() won't work

Posted by Maxime ARNSTAMM on Stack Overflow See other posts from Stack Overflow or by Maxime ARNSTAMM
Published on 2010-03-29T22:33:23Z Indexed on 2010/03/29 22:43 UTC
Read the original article Hit count: 195

Filed under:
|

Hello everyone

I'm trying to tweak a tiny bit a wordpress, but i am level 0 in php, so i kinda suck :/

I want to add a custom 'tweet this' button (i know there already is a gazillion of them, i just wanted to do it on my own, for fun)

So, i'm trying this :

<a href="http://twitter.com/home?status=<?php strip_tags(the_excerpt()) ?>" >tweet this</a>

the_excerpt() returns "<p> ... excerpt ... </p>" and the strip_tags function does not strip those <p> tags !

What do i do wrong ?

Thanks, and sorry if it is obvious.

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress