MyBB Community Forums

Full Version: MYBB run second function if first is true?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have two functions:


function 1()
{
//code blah blah....
}

function 2()
{
//code blah blah....
}

How to make function 2 execute only if function 1 is true?
if (1()) {
    2();
}
(2014-08-31, 02:19 PM)Shade Wrote: [ -> ]
if (1()) {
    2();
}

This. But you'd need function 1() to return true
Maybe it'd be better to look at a PHP guide or tutorial? That way you'd have a far more rounded knowledge of the language and programming.
(2014-08-31, 04:12 PM)Euan T Wrote: [ -> ]Maybe it'd be better to look at a PHP guide or tutorial? That way you'd have a far more rounded knowledge of the language and programming.

This, and quite honestly there are many tutorials that are really easy and good ^^
http://www.w3schools.com/ will be the right choice for you to learn web designing online.
Thanks @Shade Smile