Home Tutorial Php Phparray Php Array Implode

 
 

Share on Google+Share on Google+
Php Array Implode
Posted on: October 28, 2009 at 12:00 AM
Advertisement
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
Advertisement

Related Tags for Php Array Implode:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 28, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com