Fixing stupid spaces in php and checking it