0
Q:

how to add comma in array in php

<?php 
  
// Declare an array and initialize it 
$Array = array( "GFG1", "GFG2", "GFG3" ); 
  
// Display the array elements 
print_r($Array); 
  
// Use implode() function to join 
// comma in the array 
$List = implode(', ', $Array); 
  
// Display the comma separated list 
print_r($List); 
  
?> 
-1
string implode( separator, array )
0

New to Communities?

Join the community