You really want to handle this in your database. If you need data to be
in two fields, first name and last name, then put it in your database
that way. Save yourself some time. How easy is it to just add another
text field in your form, and insert one more variable into the

Whatever kind of "hack" you come up with in PHP is going to be a waste
of time and memory. 

---John Holmes...

> -----Original Message-----
> From: Nick Wilson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 9:23 AM
> To: php-general
> Subject: [PHP] help with sort problem
> Hash: SHA1
> Hi all,
> I hope someone might help me with a little puzzle...
> I have bunch of db results and one of the fields is 'name',
> I want to see if there are 2 parts to it like FirstName LastName and
> so order by the last name.
> I can see explode() being the php function I need here but am a little
> lost as to what will happen if there is only one word in the name var.
> If someone can suggest what I might do that would be great!
> many thanks...
> - --
> Nick Wilson     //
> Version: GnuPG v1.0.6 (GNU/Linux)
> iD8DBQE83pbjHpvrrTa6L5oRAv5XAJsFAXLb0puFyeknXoaGL7rYUHGxVACdHxt8
> ej2/Y56p75z5jZ43DvSbDzo=
> =8rzj
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to