Answers for "implode array with unique sysmbol in php"

PHP
1

array_unique

<?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique($input);
print_r($result);
?>

Array
(
    [a] => green
    [0] => red
    [1] => blue
)
Posted by: Guest on May-26-2020
5

php implode array

$values = array_map('array_pop', $array);
$imploded = implode(',', $values);
Posted by: Guest on March-03-2020

Browse Popular Code Answers by Language