![]() |
Adding commas question
Can someone please tell me how I would add commas after the room names and user names in this piece of code. I don't want and comma after the last room name or lat user name, though, if possible.
PHP Code:
|
I don't see any User- or Room Names in this Code ...
Or in other Words: How does $userList look like? |
1 Attachment(s)
Here is the code I am currently using, but as you can see there is an extra comma after the room names. It happens with more than one user, too. That's why I thought with fresh code as above, it might be easier to do the commas right. ;)
PHP Code:
|
OK, so where do you want to add commas (as there already seem to be some)?
|
I edited my post above. ;)
|
I don't really understand the Code :)
PHP Code:
|
It's for RealChat. The roomList is for the rooms and the userList is for the users. That's about all I know about it.
Here is the raw data. Quote:
|
Simplest solution in general to a problem like this is to put all usernames/roomnames into an array. Then when all names are collected do:
PHP Code:
|
And how would you go about putting them all into an array?
|
PHP Code:
|
All times are GMT. The time now is 10:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|