Jump to content


Photo

how to add a comma


  • Please log in to reply
1 reply to this topic

#1 timmy01

timmy01
  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 May 2006 - 12:44 PM

Hi,

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:

var1,var2



#2 ToonMariner

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