The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
couple functions help
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
couple functions help
Hey guys, would you help me a bit?

lets say i have a string and inside it there are ARGVS that are repeated, how would i do it to compare all argvs and if one is repeated it will only keep one of them and remove the other..

I E:
ARGS = A,B,B,B,B,C,C,D,E,F,
RETURN = A,B,C,D,E,F


Thanks in advance
09-27-2014 12:20 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: couple functions help
I have no idea why do you want this, but:
PHP Code:
[FUNCTION WTF]
LOCAL.STR ","
FOR I 0 <EVAL <dARGV>-1>
 IF !
STRMATCH("*,<ARGV[<dLOCAL.I>]>,*","<LOCAL.STR>")
  
LOCAL.STR .= <ARGV[<dLOCAL.I>]>,
 ENDIF
ENDFOR
RETURN <
STRREVERSE <STREAT <STRREVERSE <STREAT <LOCAL.STR>>>>> 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 09-27-2014 01:05 PM by Extreme.)
09-27-2014 01:05 PM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: couple functions help
Interesting, thank you very much Extreme Wink
09-27-2014 01:13 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)