Welcome Guest, Not a member yet? Register   Sign In
private function = Call to undefined function error
#1

[eluser]stef25[/eluser]
ive got some processing code in my controller id like to break out in to a separate function.

the function in question is at the bottom and its called from

Code:
$existing_tags = array_flatten($existing_tags);

Code:
function array_flatten($array)
    {
        $ab = array(); if(!is_array($a)) return $ab;
        foreach($a as $value){
            if(is_array($value)){
                $ab = array_merge($ab,array_flatten($value));
            }else{
                array_push($ab,$value);
            }
        }
        return $ab;
    }

this returns a "Call to undefined function array_flatten()" even though both snippets are in the same controller file.

i dont want this function to be accessible from the url but i removed the _underscore just to debug.

this is basic php but im stumped. anyone?


Messages In This Thread
private function = Call to undefined function error - by El Forum - 07-19-2009, 11:56 AM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:03 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:15 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:18 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:20 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:20 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:23 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:24 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 12:26 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 01:20 PM
private function = Call to undefined function error - by El Forum - 07-19-2009, 01:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB