How to convert items in array to a comma separated string in PHP?

One thought on “How to convert items in array to a comma separated string in PHP?”

  1. To convert array value to a string with comma separated values, we can use php implode functions , it will break an array to string with given separated symbol ( support any symbol other than comma as well )

    implode(‘,’, $array)
    $array =array(2,3);
    echo implode(‘,’, $array)
    Out put 2, 3

Leave a Reply

Your email address will not be published. Required fields are marked *