Jump to content

Arrays


Orca
 Share

Recommended Posts

Okay I'm not new to the coding scene, been doing some fun autoit apps recently.

I have extensive PHP background...

Now I'm working on a verification function that gets a checksum and compares it to all the values in array $checksumVal[1-n]

It returns a string.

Now in php I could simply set $arrayStuff['text'] = 1 and do if($arrayStuff[$stringVarFromOtherArray]==1)

{

stuff();

}

(of course autoit syntax is a bit different)

Okay now that I've thourougly explained this as poorly as I can...

... How can I set a value to a string array location instead of a decimal location

$array['string'] instead of $array[4]

I AM ORCA!! A VERY POWERFUL WHALE!!!

Link to comment
Share on other sites

string($int) = $string :D I ended up doing it a painful way... Though for users to config it.. It's ugly

Can you use vars in stringsplit?

$var1 = 0

$var2 = 0

$var3 = 1

$array = stringsplit('|'&$var1&'|'&$var2&'|'&$var3&'|', '|')

Something like that? Or would I need to make all the vars strings first?

BTW I love your tag!

On php freaks I usually just respond

Sometimes I link to a subpage.. :D PHP and AutoIT have amazing manuals... :)

Edited by SiC_Goat

I AM ORCA!! A VERY POWERFUL WHALE!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...