Answer by Alwin Kesler for How to limit array values in implode output
slice the array first$newArray = array_slice($array, 0, 3);echo implode(',', $newArray);
View ArticleAnswer by Charaf JRA for How to limit array values in implode output
Using array_slice : $slicedArray = array_slice($array, 0, 3); $input=implode(",", $slicedArray);
View ArticleHow to limit array values in implode output
I have more than 10 values in my array.I would like to separate it with comma. So I used this codeecho implode(",", $array);Can someone tell me how to limit the values.? I need only the first three values
View Article
More Pages to Explore .....