![]() |
Help with commas in RealChat rooms string
Could anyone please help me add commas to the string of RealChat rooms that the following code generates?
PHP Code:
Quote:
The Bear's Den The Lobby Fun Staff only! No topic Bear's Den I would like commas after the names except for the last one. This is the code that came with it so I have no idea how to add the commas. Thanks in advance. ;) |
Assuming that each channel is being retrieved on its own line, you should be able to:
PHP Code:
|
Quote:
Quote:
And thank you, very much, sir. ;) |
Replace:
PHP Code:
PHP Code:
|
Excellent! Worked like a charm! Thank you, sir. ;)
|
you could also use the php trim() function. It removes all surrounding whitespace characters, which is very helpful when dealing with strings.
|
Quote:
|
Instead of doing:
PHP Code:
PHP Code:
|
Quote:
For future reference, will the trim get rid of whitespace on both sides of the line or just the preceding whitespace? |
I am getting a comma after the amount of users in the chat room randonly now. It doesn't happen all the time but every once in a while. Like this:
Quote:
|
All times are GMT. The time now is 10:45 AM. |
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:
|