I could be wrong about this, but here goes:
Strings are in fact arrays. An array of characters. The code your
friend gave you manipulates this array in the same way that it would any
"normal" array. The only problem (not really a problem even) is that
when dealing with character-based arra
The Zend Engine is programmed in C, if I remember correctly. Strings in C
are really just pointers to character arrays, which is what you see here.
Because PHP is a wrapper of sorts, it is basically covering up the fact that
strings are character arrays. The good programmers were nice enough to
v0idnull,
[surely you don't think of yourself as a nonentity twice over?]
> A friend of mine showed me this code recently.
>
> function firstLogin_string() {
> mt_srand(make_seed());
> $pool = "AaBbCcDdEeFfGgHhIiJjKkLlM";
> $length = 26;
> for($i=0; $i < $length; $i++) {
> $key .= $pool[mt_ran
it's treating a string as a character array - it's documented somewhere in
the manual, can't remember where though :( - not long ago someone was
saying that the new way it to use curly-brackets, but square brackets still
work for backwark compatibility.
-Original Message-
From: v0idnull
4 matches
Mail list logo