I was completely unaware of the foreach() function. I read about it and found it a little complicated. What I was doing was:
$a=0;
for ($elem=0; $elem<40; $elem++)
{
global $a;
if ("John" == $list_of_names[$elem])
{$a++; break;}
else
{$dummy="do_nothing";}
}
if (a>0) {print "John is in the list";}
else {print "John is not in the list";}
See? Kind of long, isn't it? I guess you guys misinterpreted what I wanted, because I found out I can do all that with just a couple of lines, using 'in_array'. There, problem solved!
Thank you for your help, I am going to give that 'foreach' function another look and see what I can learn from it.
Cheers,
Luciano ES
Santos - SP - Brasil