regex - Regular expression, replace between "<" and ">", php -


i'm weak in regular expressions.

i need replace < , > (and anything between) new content.

this have:

$key = preg_replace('/<.*>/', '', $key); 

my little string <5> should my little string.
my little string <96> should my little string.

what did wrong?

the following works if supply string instead of $key:

preg_replace('/<.*>/', '', 'my little string <96>'); 

what value of $key?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -