This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

sendnas14714
sendnas14714

Hello!

I can't seem to use functions within other functions in the code editor, e.g.:

function getSomething( $var1, $var2, $var3) { // return something }

function doSomething() { $something = getSomething(1,2,3); }

With this code all I get is that function getSomething doesn't exist within doSomething, what should I do?

Last updated

kuni
kuni

function getSomething($var1, $var2, $var3)
{ 
     // return something
}

function doSomething()
{ 
    $something = $this->getSomething(1,2,3);
}

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.