For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2006 > Re: [PHP-DB] Displaying results from a query properly.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Displaying results from a query properly.
Greg Skouby

2006-03-27, 6:57 pm

On Fri, Mar 24, 2006 at 04:19:10PM +0000, Alex Major wrote:
> Hi there.
> This isn't a major problem, more of a matter of aesthetics.
> Basically, I have a query which pulls a list of usernames from the database
> (based on their user level).
>
> These users should then listed in this fashion.
>
> Administrators: allydm, alex, mike, dave
> Moderators: big 'd', frank, william
>
> However, the loop that I have returns the results like this...
>
> Administrators: allydm, alex, mike, dave,
> Moderators: big 'd', frank, william,



As an alternative to what the others have said you could use trim() also.
Specifically the second, and optional, parameter.

http://www.us2.php.net/trim


--Greg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com