Home Tutorial Php Phparray PHP array join

 
 

Share on Google+Share on Google+
PHP array join
Posted on: October 28, 2009 at 12:00 AM
Advertisement
This section illustrates the use of the join function in php

  • Join function add all the elements of the given array into a single string variable.
  • It woks similar to implode function.
  • It is the alias of the implode function.


PHP Array Join() Example

<?php
$myarray
=array("c"=>"cpu","m"=>"monitor","m1"=>"mouse","k"=>"keyboard","joystick");
print_r($myarray);
$array1
=join($myarray);
echo
"<br>";
print_r($array1);
?>

Output
Array ( [c] => cpu [m] => monitor [m1] => mouse [k] => keyboard [0] => joystick )
cpumonitormousekeyboardjoystick
Advertisement

Related Tags for PHP array join:


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