I have tried to search php.net and the forums but I can't seem to find what I am looking for.
I am sure this is incredibly simple, yet I can't grasp how to do it.
Basically I am performing an nslookup as such:
$nslookup = nslookup -query=a $server $value;
The results of $nslookup print as this:
Server: ISBDNS.server.com Address: 205.145.66.189 Name: yahoo.com Address: 66.218.71.198
What I need is to seperate each part of the results on a new line, so it appears as this:
Server: ISBDNS.server.com
Address: 205.145.66.189
Name: yahoo.com
Address: 66.218.71.198
I can't seem to figure out how to split the items.
I have looked at preg_split but am unable to find a way to make this work.
Any help would be appreciated!!!