I don't think all systems are going to return forms where the newline delimiter is \r\n when you split the hostnames. You might be better off using preg_split so you can also account for instances where a user submits just \n or just \r. It's a common example in php.net/str_replace. If you don't want to invoke the preg library, you could even str_replace before doing a regular explode.

Comments

desecho’s picture

Status: Active » Closed (fixed)