trim($this->input->post('whatever'); |
[eluser]SaminOz[/eluser]
I just came across an issue in PHP that had me flumuxed for a while. I had some code in this format Code: $data['job'] = array( which I was trying to input. I kept on getting errors as I iterated through the $job array. The post('staff_ID') and it's siblings (which I've removed here) were all arrays sent from the page where there were multiple form elements i.e. staff_ID[]. It transpires that PHP will return the string 'Array' instead of the elements if you use trim as you might in a single key/value pair. I thought this might be useful to someone else sometime. See also: Quote:thek at o2 dot pl |
Messages In This Thread |
trim($this->input->post('whatever'); - by El Forum - 09-11-2010, 01:30 AM
|