Explode function split a line of text into more then one parts. For example, if you have Student name in one sentence and you want to break these text and split each name and then store in array, then you can use Explode ( ) function.
$names=" Tauqeer, Bilal , Nadeem Ali, Muhammad saleem" ;
if you want to display the result As:
Name
Tauqeer
Bilal
Nadeem Ali
Muhammad Saleem
So for this purpose first we spilt the line of text and then printed each part in next line:
"; ?>
In above code first we Spilt the text with explode function. and store each name in array $names. In next step foreach loop access the each elemnt of array store in $x and then display the name in separate line.
Variables in PHP
PHP Concatenation
Calculation in PHP
If Statements in PHP
if ... else Statements in PHP
Nested IF Structure in PHP
PHP Comparison Operators
Switch Statement in PHP
Logical Operators In PHP
PHP Booleans
FOR Loop in PHP
While Loop In PHP
foreach Loop In PHP
Break Statement
Array In PHP
Associative Array
The Count function
Changing Case Function
Trim Function In PHP
Str_shuffle( ) function
strpos function in PHP
Explode() Function in PHP
Function
Passing Function Arguments
Server Variables
Header Function
Include Function
The require Function