I have an array containing numbers 1-5 (sometimes more). All the members in the array can be displayed using the php function foreach. But, how can I display all the members of my array by storing it in a single variable as csv (like1, 2, 3, 4, 5), and thereby printing that variable only?
I have an array containing numbers 1-5 (sometimes more). All the members in the
Share
You could use the function
implode().For example
Have a look at the Manual.