Use split() to limit a parameter to restrict division of $ip
<? $ip = "123.456.789.000"; $iparr = split ("\.", $ip, 2); print "$iparr[0] <br>"; print "$iparr[1] <br>"; ?>