Home Tutorial Php Phparray Php Array Implode

 
 

Php Array Implode
Posted on: October 28, 2009 at 12:00 AM
This section illustrates the use of PHP Array implode function.

  • implode function joins all elements of the given array into a single String variable


PHP Array Implode Function Example
<?php
    $ar1
=array("we","all","are","human beings");
    echo
"size is ".sizeof($ar1)."<br>";
    print_r($ar1);
    echo
"<br>";
    $entity
=implode($ar1);
    echo
"size is ".sizeof($entity);
    echo
"<br>".$entity;
?>

Output
size is 4
Array ( [0] => we [1] => all [2] => are [3] => human beings )
size is 1
weallarehuman beings

Related Tags for Php Array Implode:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.