Re: parse error: [PHP] usort e & é toge ther
| From: | Marek Kilimajer | Date: | Sun, 11 Jul 2004 18:10:06 +0000 |
| Subject: | Re: parse error: [PHP] usort e & é toge ther | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190192@lists.php.net to get a copy of this message | ||
I'm sorry, I used unescaped single quotes inside single quoted string, this is right:
usort($authors, create_function('$a,$b','
$a = str_replace(array("é", "à"), array("e", "a"), $a);
$b = str_replace(array("é", "à"), array("e", "a"), $b);
return strcasecmp($a,$b);'));
John Taylor-Johnston wrote:
I went with this, but am getting a parse error. usort($authors, create_function('$a,$b','$a = str_replace(array('é', 'à'), array('e', 'a'), $a); $b = str_replace(array('é', 'à'), array('e', 'a'), $b); return strcasecmp($a,$b);'));Anyone see it? I've got headaches from squinting at the monitor. Thanks, J Marek Kilimajer wrote:usort($authors, create_function('$a,$b','$a = str_replace(array('é', 'à', ....), array('e', 'a'), $a); $b = str_replace(array('é', 'à', ....), array('e', 'a'), $b); return strcasecmp($a,$b);'));