Use split() to limit a parameter to restrict division of $ip : split « String « PHP






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>";        
?>
  
  








Related examples in the same category

1.Generating date-based drop-down menu options
2.split() function divides a string into various elements.
3.split.php