I have an array
$this->input->post("first_array")={ one two three }
I need to create an array which will hold several arrays like that
so I am doing a 'fisrt_array' to hold the array, first verifiying that it is indeed an array, then if it is not set I put a 'not defined' string
array(
'fisrt_array' => is_array($this->input->post("first_array")) ? implode(' ',$this->input->post("first_array")) : 'Not defined'
);
So if it is set, I implode the array that is saved in $this->input->post("first_array")
All is correct but I store the result like one two three instead of one,two,three
How can i save the array in that format?
If i do implode(',',$this->input->post("first_array")
i would store one,two,three, with last not wanted comma..