MYBB run second function if first is true?
#1
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?
Reply
#2
if (1()) {
    2();
}
[Image: fSGNVQj.png]
Reply
#3
(2014-08-31, 02:19 PM)Shade Wrote:
if (1()) {
    2();
}

This. But you'd need function 1() to return true
Reply
#4
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.
Reply
#5
(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 ^^
Rasmus Lerdorf Wrote:If eval() is the answer, you're almost certainly asking the wrong question. - Rasmus Lerdorf
Reply
#6
http://www.w3schools.com/ will be the right choice for you to learn web designing online.
Reply
#7
Thanks @Shade Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)