Jump to content


how to add a comma

  • Please log in to reply
1 reply to this topic

#1 timmy01

  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 May 2006 - 12:44 PM


i looking for a simple way to add a comma after each mysql result...

so after getting the result from mysql i get this:

var1 and var2

now, all i want is a way to separate them with a comma
so i should look like this:


#2 ToonMariner

  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 01 May 2006 - 12:49 PM

if you made an array of results you could use implode(',',$arr);
follow me on twitter @PHPsycho

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users