So I have the following function on my code:
/* returns a random string */
function randStr($length = 32, $chars = "abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ!@#$%&*()_-+=") {
//function randStr($length, $chars) {
$validCharNumber = strlen($chars);
for ($i = 0; $i < $length; $i++) {
$str .= $chars[rand(0, $validCharNumber - 1)];
}
return $str;
}
it was working ok on my local server and some other development server that we used. But on the final server, I keep getting the following message: Parse error: syntax error, unexpected '"'
I searched on google but I couldnt get precise results because I can't use quotes to be more accurate when I'm searching about quotes.
I'm also getting the same error message on this block of code
"last_update" => Array("display" => "return toDate('$1', 'd/m/Y H:i:s');")
Where's the error? Did I miss any kind of configuration for double quotes or something?