The $gettok identifier works this way: $gettok($1-,1,45)

- The blue part contains the text which you want to work with;

- The red number is the token(s) you want to retrieve. If you wish to get the first token, then use 1. If you want to get the last token, use -1. To get the third token use 3 and so on.. You can also specify a sequence, i.e. from tokens 5 to 7 you can use 5-7;

- Finally, the orange number is what tidy_trax and Coolkill explained. This number refers to the Ascii character of the separator of the tokens.

Eg: one,two,three,four --> the separator is the comma (,) which is $chr(44).
Hi there mate! --> separator is the space, which is $chr(32).

So, in order to make that work with an equal sign, for example, you change the 45 for the 61 (which is the Ascii value of =).

$gettok(one=two=three=four=five,3,61) -> This returns three, since we are asking for the 3rd token separated by =

$gettok(one two=three four=five six,1,61) -> In this case, the value returned is one two because we requested the 1st value separated by the = (not the space).

I hope this could be of any help smile
Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon