Duckie 0 Report post Posted December 29, 2004 OK uh how do i make a script to where it would auto replace spaces in aim names with + but it appears with a space on the site, with the aimgo: url cmd.. so like asdf asdf sdf would be in the code: <a href="aim:goim?screenname=asdf++asdf+sdf&message=boo"></a> and i have an auto thing, where i add a member, but how would it replace cause like i have a Edit Profile section with lazy ppl forgetting to put the + in between spacesthanks~if u have ne q's ask me at aim ARandomDotthanks in advance Share this post Link to post Share on other sites
rigueira 0 Report post Posted November 27, 2007 in PHP language you can use 'explode' function to remove spaces from a String or 'implode' function to put spaces into then...http://br2.php.net/manual/en/function.explode.phphttp://br2.php.net/manual/en/function.implode.php Share this post Link to post Share on other sites
galexcd 0 Report post Posted November 27, 2007 (edited) explode takes a string and breaks it up into an array while implode "glues" an array back together, so if you used explode and implode you would have to do something like this: implode("+",explode(" ",$string));which is a huge waste of code and processor time.I would suggest using str_replace if you want to use php for this.str_replace(" ","+",$string); If you don't want to use php javascript has a very similar function:string.replace(" ","+"); If you gave me some code on your website I could help implement it for you. Edited November 27, 2007 by alex7h3pr0gr4m3r (see edit history) Share this post Link to post Share on other sites