I've currently got
preg_replace('/[^0-9]/s', '', $myvariable);
For example the input is GB -3. My current line is giving me the value 3. I want to be able to keep the minus so that the value shows -3 instead of the current output of 3.
I've currently got
preg_replace('/[^0-9]/s', '', $myvariable);
For example the input is GB -3. My current line is giving me the value 3. I want to be able to keep the minus so that the value shows -3 instead of the current output of 3.