Menu
Hi all,
I have some values in a array defined as number[] in a list box.
foreach($_POST[‘number’] as $key=>$value)
{
$reg .=$value.”,”;
}
So if i select 1 2 3 then the above code is producing 1,2,3, but i want to have it as 1,2,3
So number of commas is one less then number of elements present in a array and it will be always true.
I am running the above foreach loop but everytime I am getting a comma at the last of the array values……Could you please suggest me how can i remove the last comma
Thanks
Raj