Welcome Guest, Not a member yet? Register   Sign In
where can i put my own function
#1

[eluser]syntaxerror[/eluser]
hi,
can anyone please help me.
i have my own function that makes an array to lower case (strtolower)
because php has no built in function to convert array to lower case
i make my own function.
my question is where should i put this function in code igniter?
model?view? or controller?

BTW my script is
Code:
function arraytolower($array,$round = 0){
    foreach($array as $key => $value){
        if(is_array($value)) $array[strtolower($key)] =  $this->arraytolower($value,$round+1);
        else $array[strtolower($key)] = strtolower($value);
        }
        return $array;
    }

thanks


Messages In This Thread
where can i put my own function - by El Forum - 10-30-2008, 02:04 AM
where can i put my own function - by El Forum - 10-30-2008, 02:36 AM
where can i put my own function - by El Forum - 10-30-2008, 03:09 AM
where can i put my own function - by El Forum - 10-30-2008, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB