Quote:
Originally Posted by LearninG
what type of values can i add into "()"
|
Any.
Quote:
Originally Posted by LearninG
how to use them in function ?
|
The way it's meant to be used.
Quote:
Originally Posted by LearninG
does this example works ?
PHP Code:
public some_func(variable1 , variable2)
{
variable1 = random_num(5,15)
variable2 = variable1 + 10
if (variable1 < 10)
{
return variable2
}
}
|
If you mean compile, then it should, but I don't know what way you're expecting it to work, it takes 2 values, then assigns a random number in-between 5 and 15 to the first variable, then increases then second variable by 10, then it checks whether variable1 (the random number) is smaller than 10 and returns variable 2 if true.
__________________