i have a string with outputs a bunch of IPs each on a new line, example:
12.232.2.232 12.232.2.232 12.232.2.232 12.232.2.232
is it possible to insert each IP into its own row? how can i do this if they are all in one string?
$str="12.232.2.232 12.232.2.232 12.232.2.232 12.232.2.232"; $arr=explode("\n",$str); foreach($arr as $ip) { // here $ip contains each IP in the string $str }