Answers for "php array string"

PHP
12

implode php

$array = array('banana', 'strawberry', 'apple');
comma_separated  = implode(",", $array);
echo comma_separated; // banana,strawberry,apple
Posted by: Guest on October-26-2020
0

php implode

$arr = ['Thor','Captain America','Iron Man'];
echo implode(', ',$arr);
// "Thor, Captain America, Iron Man"
Posted by: Guest on November-18-2020
1

arry to string php

implode("|",$type);
Posted by: Guest on April-07-2020
0

$array

// this is a covenient way to push or crate an array and push element to it, if null  
$arr = [1, 2, 3];
$arr[] = 4; // $arr = [1,2,3,4]
Posted by: Guest on January-01-1970

Browse Popular Code Answers by Language