Php Array Implode
This section illustrates the use of PHP Array implode function.
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