a little stupid rookie question...

Started by Hyperion (noobKID), February 19, 2013, 03:54:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hyperion (noobKID)


elephant

It is accessing the value of a numerically indexed array. $arr as a variable name is not very descriptive, but in this case it contains the number of registered users:

$res = sql_query("SELECT COUNT(id) FROM users") or sqlerr(__FILE__, __LINE__);
$arr = mysqli_fetch_row($res);


if($arr[0]) mail(...)
Relies on any integer greater than zero being evaluated as boolean true. So an email is only sent if they are not the first person (ie. sysop) to register.

Hyperion (noobKID)

yoooo... long time since... well, since ;)..

anyways..

inside takesignup.php, im seeing this: $arr[0]

now i might be asking stupidly, but what does it do?...

examble: if($arr[0]) mail(...)

does it says if the (array) is bigger then 0 orr?... what does it stands for?, someone might explain to me?...

i know its some sort of array, lol... just never got the freaking idea of why it is there...

thanks in advance boyz and girlz ;)...