Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

in loop how add string by comma in php

//join string values by comma in loop
$string = '';

foreach ($array as $key => $value) {
    $string .= ",$value";
}

$string = substr($string, 1); // remove leading ","
//@sujay
Source by docstore.mik.ua #
 
PREVIOUS NEXT
Tagged: #loop #add #string #comma #php
ADD COMMENT
Topic
Name
3+5 =