PHP Implode( ) function

 String to Array conversion is implode function in php 

example :  

<?php
$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
?>

Syntax : 

implode(separator,array)


Examples :

<?php
$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr)."<br>";
echo implode("+",$arr)."<br>";
echo implode("-",$arr)."<br>";
echo implode("X",$arr);
?>

PHP Implode( ) function PHP Implode( ) function Reviewed by Admin on August 10, 2020 Rating: 5

No comments:

Powered by Blogger.