PHP spliti() Function

Hello dear readers! welcome back to another section of our tutorial on PHP. In this tutorial guide, we will be discussing about the PHP spliti() Function.

The spliti() function operates in the same way as its peer split(), except that it is case-insensitive. Case insensitive characters are an issue only when the pattern is alphabetical. For other characters, spliti() operates the same way as split() does.

RECOMMENDED: PHP split() Function


The following is the syntax for the spliti() function -

array spliti (string pattern, string string  [, int limit]);

Return Value

  • Returns an array of strings after splitting up a string.


Following is a simple example -

   $ip = "123.456.789.000"; // some IP address
   $iparr = spliti ("\.", $ip, 3); 
   print "$iparr[0] <br />";
   print "$iparr[1] <br />" ;
   print "$iparr[2] <br />"  ;
   print "$iparr[3] <br />"  ;



When the above code is executed, it will produce only three strings as we have limited the number of strings that is to be produced -



Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial guide, we are going to be discussing about the PHP sql_regcase() Function.

Feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.