KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am doing a preg_replace: $pattern = '/<ul>/'; $replacement = ""; $string = "hello <ul> how are you doing </ul>"; echo preg_replace($pattern, $replacement, $string); That will replace my <ul> with "" but Id like to replace anything that is a <ul> or </ul> , I am not getting how to use the | (or) character though. I try like this, but it is not working right: $pattern = '/<ul>|</ul>/'; $replacement = ""; $string = "hello <ul> how are you doing </ul>"; echo preg_replace($pattern, $replacement, $string); Any help would be surely appreciated Thanks, Bryan
Tags (comma-separated)
Save Edits
Cancel