Welcome, Guest. Please Login or Register.
May 08, 2025, 01:12:14 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How do I strip spaces? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: How do I strip spaces?  (Read 270 times)
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

How do I strip spaces?
« on: October 29, 2002, 08:10:50 PM »
Reply with quote

I am working on an awsome chat mod that interfaces with an irc server. It already shows the list of users in  the room and automatically logs the users in. The problem is that usernames can contain spaces in Yabb but not in Irc. How can I take the $user variable and strip out the spaces? Thanks

Goosemoose
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:How do I strip spaces?
« Reply #1 on: October 29, 2002, 08:13:20 PM »
Reply with quote

use: $chatname = str_replace(" ","_",$username);
if that doesnt work replace the space with chr(32)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How do I strip spaces? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.011 seconds with 17 queries.