|
|
|
|
![]() ![]() |
Dec 29 2004, 04:38 AM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 12 Joined: 25-December 04 Member No.: 2,918 |
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: 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 spaces thanks~ if u have ne q's ask me at aim ARandomDot thanks in advance |
|
|
|
Nov 27 2007, 12:22 PM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 28 Joined: 25-November 07 Member No.: 53,723 |
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.php http://br2.php.net/manual/en/function.implode.php |
|
|
|
Nov 27 2007, 07:03 PM
Post
#3
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,189 Joined: 25-September 05 From: Los Angeles, California Member No.: 12,251 myCENT:39.85 |
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:
CODE 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. CODE str_replace(" ","+",$string); If you don't want to use php javascript has a very similar function: CODE string.replace(" ","+"); If you gave me some code on your website I could help implement it for you. This post has been edited by alex7h3pr0gr4m3r: Nov 27 2007, 07:03 PM |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 22nd November 2008 - 05:15 PM |