Be warned that explode won't work as expected if any of your fields contain
colons, though it doesn't look like it'll be an issue in this sort of case.

"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use the explode() function based on the colon.  Then parse the 2nd array
> element for the username that you want.  If matched, display all elements
in
> that array row.  Conversely you could use the implode() to reassemble the
> array row.
>
[...]
>
> "Tom Ray" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I want to be able to search a flat file line by line looking for data
> > such as a username then display all the information in that line. Is
> > there some way to search the following format:
> >
> > record1:username:info:info:info
> > record2:username:info:info:info
> > record3:username:info:info:info
> >





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to