str replace - How to remove brackets (chevrons) in php -


out there, have question:

i want remove chevrons (brackets) string in php:

example: string= ">autor</" want remove < , </, how this?

i tried this:

$result = ">autor</"; $result = str_replace(arr0ay(">","</"),"",$result); echo $result; 

but won't remove characters want removed, have idea?

thanks in advance

edit: //list contains attributes, autor, titel

foreach($list $show){  $show = trim($show);  $text=htmlspecialchars($xml->hits->hit[$j]->info);  echo $show." = ";  preg_match ("/$show.*$show/", $text, $result);  $result = implode($result);  $result = str_replace(array("$show",">","</"),"",$result);  $result = str_replace(array(">","</"),"",$result);  echo $result; } 

so found out, how it, , if else have same problem got, know how it:

you need str_replace("oldstring_to_find", "newstring_oldstring_get_replaced_with","variable");

thx help


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -