Raised This Month: $ Target: $400
 0% 

How to get unique id from array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-27-2022 , 04:45   Re: How to get unique id from array
Reply With Quote #2

Non tested.
PHP Code:
stock array_unique(array[], size)
{
    for (new 
0size 1; ++i) {
        for (new 
1size; ++j) {
            if (array[
i] == array[j]) {
                
copy(array[1], size 1, array[i]);
                --
size;
                --
j;
            }
        }
    }

    return 
size;

__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode