Randal Rust wrote:
> while(!$unique) {
>     $check=checkDuplicate($newTeam);
>
>     if($check) {
>         $unique=true;
>     } else {
>         $unique=false; }
>     }

Guess what happens when $unique is FALSE?

As a helpful suggestion, when it takes 40 lines of code to check to see
whether a value is in an array, it's probably a good idea to take a step
back and see if there is a simpler solution:

http://php.net/in_array

Hope that helps.

Chris

-- 
Chris Shiflett
http://shiflett.org/
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to