I am trying to remove Whitespaces and & in a URL and replace it with a -. So far the following works:
preg_replace('/\s+/', '-', $page->label) // whitepace gets replaced with -
preg_replace('/\&/', '-', $page->label) // & gets replaced with -
I would like to have this in one line, but I am not able to combine the 2. Can anyone help? Thank you very much in advance.