split() function divides a string into various elements.
Its syntax is: array split (string pattern, string string [, int limit])
<?
$ip = "123.456.789.000";
$iparr = split ("\.", $ip);
print "$iparr[0] <br>";
print "$iparr[1] <br>";
print "$iparr[2] <br>";
print "$iparr[3] <br>";
?>
Related examples in the same category