It appears the only change you made was :

>     $tmp .= $chars[mt_rand(0,$chars_len)];

>From :

> >     $tmp .= $chars{mt_rand(0,$chars_len)};

Which is strange.  the [] use on strings has been depreciated in favor
of {} as of php4 but I don't know at what version {} came into being
exactly. What version of PHP are you running, php3?  Or, does anyone know
much about this?

Anyway, glad it works :)

For informational purposes, this depreciation is stated here :

  http://www.php.net/manual/en/language.types.string.php

And for those watching at home, am referring to :

  $string = 'abc';

  print $string[0]; // depreciated (might not work one day, when?)

    vs.

  print $string{0};

Both print 'a' though.


Regards,
Philip Olson


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to