[PHP] in_array algorithm

2002-02-06 Thread John Fulton
Does anyone know which algorithm in_array() uses? For example, if I say in_array("foo", $arr) Does in_array() do an unordered sequential serach of $arr for "foo" which takes up to n comparisons [where n = count($arr)], or does it do a binary search which takes about lg(n) comparisons? Is

Re: [PHP] Online tutorials for form validation in PHP

2002-02-06 Thread John Fulton
Laurie, You should use the funtions isset() and empty() along with the appropriate conditionals. I have a tutorial which demonstrates a way to do this: http://www.rci.rutgers.edu/~jfulton/php1/forms.html John -- John Fulton, Webmaster, Rutgers University Computing Services. On Wed, 6

[PHP] empty() & texarea

2002-03-01 Thread John Fulton
I can't seem to get empty() to check if someone has left a textarea unanswered in an online form with code like the following: if(empty($open_why_good_consult)) { print "Please fill in why you would be a good consultant"; } Any ideas? It seems to work for things like this: if

Re: [PHP] empty() & texarea

2002-03-04 Thread John Fulton
e death, neither sorrow, nor crying, neither shall there be any more > pain: for the former things are passed away." - Revelation 21:4 > > > > From: John Fulton <[EMAIL PROTECTED]> > > Date: Fri, 1 Mar 2002 11:45:07 -0500 (EST) > > To: [EMAIL PROTECTED] &