[Array] Need help. menu

User Tag List

Results 1 to 15 of 15
  1. #1
    Yamanaki's Avatar Member
    Reputation
    3
    Join Date
    Feb 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Array] Need help.

    Greetings.

    I need help with my array. First I will show you how the array looks:

    Code:
     
    Array ( [0] => 19901225160000;-160;1003 [1] => 19900313100000;-121;10003 
    [2] => 19900302010000;58;100001 [3] => 19900302010000;83;100002 
    [4] => 19900303004000;-75;100003 [5] => 19900302070000;229;100004 
    [6] => 19900302010000;36;100005 [7] => 19900302010000;-999999999;100006
    The array is rather huge (up to 47k values). In the array I want to look at a certain value, see example down below (represented in bold):

    Code:
     
    19901225160000;-160;1003
    What I want to do is check for that last part in every array, and if the last part is equal to one of the following numbers:
    • 1001
    • 1002
    • 1003
    • 1004
    • 1005
    • 1006
    • 1007
    • 1008
    I want that line pushed into a new array. Then my new array would look like:

    Code:
    Array ( [0] => 19901225160000;-160;1003 [1] => 19900313100000;-121;1002 
    [2] => 19900313100000;-121;1001 [3] => 19900313100000;-121;1006 
    [4] => 19900313100000;-121;1007 [5] => 19900313100000;-121;1005
    What do I need to do, to make it work?

    Thanks in advance.
    Last edited by Yamanaki; 03-13-2008 at 08:49 AM.
    Proud to be Druid!6):

    [Array] Need help.
  2. #2
    warsheep's Avatar Contributor
    Reputation
    184
    Join Date
    Sep 2006
    Posts
    1,216
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wish I could help, but arrays isn't close to what I'm good at...
    FOR A MOMENT, NOTHING HAPPENED. THEN, AFTER A SECOND OR SO, NOTHING CONTINUED TO HAPPEN.

  3. #3
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You forgot the , after every block.

  4. #4
    Yamanaki's Avatar Member
    Reputation
    3
    Join Date
    Feb 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it working.
    Proud to be Druid!6):

  5. #5
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here ya go
    Code:
    yourArray = Array(
    0 => 1001,
    1 => 1002,
    2 => 1003,
    3 => 1004,
    4 => 1005,
    5 => 1006,
    6 => 1007,
    7 => 1008
    );


  6. #6
    NRK's Avatar Member
    Reputation
    19
    Join Date
    Mar 2007
    Posts
    82
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by insanesk8123 View Post
    here ya go
    Code:
    yourArray = Array(
    0 => 1001,
    1 => 1002,
    2 => 1003,
    3 => 1004,
    4 => 1005,
    5 => 1006,
    6 => 1007,
    7 => 1008
    );
    reading is rly hard, isn't it? :P

    1. He don't want a array with 1001-1008 in it
    2. "Got it working. "-> he don't need any help on it
    3. 0=>,1=>..... yay... just do this... Array(1001,1002,1003,1004,1005,1006,1007,100;... the result is the same...

  7. #7
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, i didnt mean to make you wet your pants, I just thought I would submit something.


  8. #8
    NRK's Avatar Member
    Reputation
    19
    Join Date
    Mar 2007
    Posts
    82
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by insanesk8123 View Post
    Sorry, i didnt mean to make you wet your pants, I just thought I would submit something.
    .... just read what the topic maker has written, he don't want an array as you have written. So whatever you've done... it is nonsense...

    How did you ever got rep, when you just post some random off topic stuff?... >_>

  9. #9
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I have some bit of intelligence and maturity but I misread something and I also saw that he didn't need anymore help but its not gonna hurt anyone by posting something, if someone had a problem with arrays they would have to make a new topic but because I posted what a general array would look like they don't. Know go run along and flame someone else, possibly even get a life while your at it... if your lucky. Don't try me
    Last edited by Pragma; 03-16-2008 at 10:04 PM.


  10. #10
    runiker's Avatar Contributor
    Reputation
    105
    Join Date
    Nov 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by insanesk8123 View Post
    Because I have some bit of intelligence and maturity but I misread something and I also saw that he didn't need anymore help but its not gonna hurt anyone by posting something, if someone had a problem with arrays they would have to make a new topic but because I posted what a general array would look like they don't. Know go run along and flame someone else, possibly even get a life while your at it... if your lucky.

    well said there

  11. #11
    Saedusii's Avatar Contributor
    Reputation
    116
    Join Date
    Nov 2007
    Posts
    457
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Flaming is bad. DIE IN A FOUNTAIN. (Because fire reminds me of flaming)


  12. #12
    Loveshock's Avatar Whip it whip it real hard
    Reputation
    373
    Join Date
    Jul 2007
    Posts
    903
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by NRK View Post
    .... just read what the topic maker has written, he don't want an array as you have written. So whatever you've done... it is nonsense...

    How did you ever got rep, when you just post some random off topic stuff?... >_>
    How far is your head up your ass? Because I don't see an off topic post in this thread. He misread what the OP said. Either way, he's still trying to help the guy out so don't get your panties in a bunch. And one more thing, insanesk8 has contributed a lot more to this site that you have, obviously.


  13. #13
    Kuiren's Avatar Banned
    Reputation
    611
    Join Date
    Nov 2006
    Posts
    1,118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by NRK View Post
    .... just read what the topic maker has written, he don't want an array as you have written. So whatever you've done... it is nonsense...

    How did you ever got rep, when you just post some random off topic stuff?... >_>
    You're horrible at flaming, my baby sister can flame harder then you.

    Grow up guys.. Even if they get something wrong, give them a pat on the back because they're still trying unlike a lot of members on this forum.

    I'll hand out infractions if I see anymore flames..

  14. #14
    Demonkunga's Avatar Banned
    Reputation
    124
    Join Date
    Jun 2006
    Posts
    2,376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We really don't need people like you here NRK. Please leave quietly.

  15. #15
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Demonkunga View Post
    We really don't need people like you here NRK. Please leave quietly.

Similar Threads

  1. [Help][C++] Need help with array of pointers
    By prospectingemu in forum Programming
    Replies: 3
    Last Post: 03-18-2014, 10:13 PM
  2. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  3. I need help
    By ff9pro in forum World of Warcraft General
    Replies: 4
    Last Post: 07-05-2006, 08:43 PM
  4. Need help
    By zamp in forum World of Warcraft General
    Replies: 1
    Last Post: 06-24-2006, 10:54 PM
  5. Need Help
    By Slumlorde in forum World of Warcraft General
    Replies: 4
    Last Post: 06-23-2006, 08:20 AM
All times are GMT -5. The time now is 12:03 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search