NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help with while loop

Randal Rust randalrust at gmail.com
Mon Nov 27 15:43:33 EST 2006


On 11/27/06, Chris Shiflett <shiflett at php.net> wrote:

> 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:

Yeah, I know. This is the client's hair-brained idea. I told him I'd
take a look. The problem all goes back to how they are handling their
data.

They are using LDAP for data storage. Each record has a 'key' value
which they want to be unique. The key is generated from a combination
of three user-input values, so it's not as easy as 'Browns.' In the
current system, there is no check in place to ensure that the key is
unique. In the new system, they want the script to generate the key
and ensure its uniqueness.

-- 
Randal Rust
R.Squared Communications
www.r2communications.com



More information about the talk mailing list