Welcome Guest, Not a member yet? Register   Sign In
Kindof a php question.. but..re: adding to arrays
#2

[eluser]TheFuzzy0ne[/eluser]
I don't think you even need to bother with array_push. It just seems to complicate things in your case:

Code:
$editData = array(
        'Shortcode' => $this->input->post('Shortcode'),
        'ListName' => $this->input->post('ListName'),
        'InjectPassword' => $this->input->post('InjectPassword'),
        'APIusername' => $this->input->post('APIusername')
    );

$this->service->editService($this->input->post('service_id'), $editData);

$this->input->post() returns FALSE if the specified key doesn't exist in the post array. I trust you're validating the input before sending it to the model?


Messages In This Thread
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-22-2009, 06:50 PM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-22-2009, 07:44 PM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-22-2009, 11:37 PM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-23-2009, 06:14 AM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-23-2009, 06:49 AM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-23-2009, 06:50 AM
Kindof a php question.. but..re: adding to arrays - by El Forum - 04-23-2009, 06:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB