The Daily Click ::. Forums ::. Klik Coding Help ::. Can you search an Array for a string?
 

Post Reply  Post Oekaki 
 

Posted By Message

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
31st August, 2011 at 04:02:41 -

Can you search a 1 dimension array (X only) for a string and return it's X position?

For example, here's an array:

Pitbull
German Shepherd
Husky

Can you search for German Shepherd and return a value of 2?

 
n/a

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
31st August, 2011 at 06:25:39 -

Which program are you using? I'd say the answer is probably yes though, since what you're asking for is one of the reasons there are such a thing as arrays to begin with

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
31st August, 2011 at 08:30:52 -

I'm using MMF2.

I can create a loop to check each entry 1 at a time, until all entries have been checked and compare it with my search query, but is there an in built action to search an array is what I'm asking?

Cheers!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click