Code: Select all
echo gettoken("a,b,c,d,e", "count", ","); // 5Code: Select all
echo gettoken("a,b,c,d,e", "count", ","); // 5Yes, i was confused too when Don first introduced this, but its to get all 5 tokens; a thru e.Marco wrote:But I see only four commas...Code: Select all
echo gettoken("a,b,c,d,e", "count", ","); // 5
So in this case is a count of tokens and not a count of separators, right? Ok, now makes sense.serendipity wrote:Yes, i was confused too when Don first introduced this, but its to get all 5 tokens; a thru e.
edit: token 1 would be a and tone 5 would be e, commas are separators not tokens itself.