Jul 9, 2003 #1 k3bap Programmer Jul 9, 2003 8 GB I need to truncate an IP address so that if I have 192.168.0.1 I end up with 192.168.0 any ideas what would be the best way to do this?
I need to truncate an IP address so that if I have 192.168.0.1 I end up with 192.168.0 any ideas what would be the best way to do this?
Jul 9, 2003 Thread starter #2 k3bap Programmer Jul 9, 2003 8 GB solved it $words = explode(".", $ip); echo ($words[0].".".$words[1].".".$words[2]); Upvote 0 Downvote
solved it $words = explode(".", $ip); echo ($words[0].".".$words[1].".".$words[2]);