I'm using wordpress for my main site and I'm attempting to run some code, it should be really simple... I need to remove to strip an input to just characters with no spaces etc...
I'm attempting to use:
$postcode = preg_replace('/\s+/', '', $postcode);
however for some reason when I click save in the php plugin I'm using it becomes:
$postcode = preg_replace('/s+/', '', $postcode);
Is there any reason that a \ would be getting removed?
My site is wordpress and the plugin is Custom-CSS-JS-PHP