ipad 2 prices

i pad 2

ipad price

Ipad 3

price of ipad 2

Ipad 3

the ipad

ipads

magento hosting

sex chat

PHP Explode Function – Split Strings with PHP Explode Function

When you are developing some application with PHP, then there might be a need to split the contents received from users or to split the contents which are stored in database and its a very common scenario where we can use PHP’s inbuilt function “explode”.

Splitted values can be used for manipulation as the values returned by explode function are “array”, so we can use it.

Checkout the following code its very simple to understand & use.

<?php
$string = "Some Contents Which Can Be Splitted With PHP Explode Function and Array can be Printed !";
$splitted = explode(" ",$string);
$cnt = count($splitted);
$i=0;
while($cnt > $i)
{
 echo "$splitted[$i]";
 echo "\n";
 $i++;
}
?>

Check PHP Manual for PHP Explode Function.

Related posts:

  1. How to Create a shoutbox using PHP and AJAX (with jQuery)

Leave a Reply