php - Need to preg_replace "/|/" -
$title = preg_replace("/|/", "", $title);
in case you're wondering "/|/" it's sign on same key backslash, except use shift key use it.
it doesn't if in example. there must way of removing it.
i don't know exacly if want remove pipe |
or literally /|/
here 2 examples:
$title = "hi | there"; $text = preg_replace("/\|/", "", $title); echo $text; //"hi there"; $title = "hi /|/ there"; $text = preg_replace("/\/\|\//", "", $title); echo $text; //hi there
Comments
Post a Comment