Little correction for php website

From: Date: Fri, 31 Jan 2003 20:38:54 +0000
Subject: Little correction for php website
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15381@lists.php.net to get a copy of this message
Hi, I probably discovered a little mistake on the php website. It is on the documentation page for the preg_replace function (http://www.php.net/manual/en/function.preg-replace.php). Inside the box for example 1 there are listed a few variables. The first one ($str) is named $string in the function. So, this text: $str = "April 15, 2003"; $pattern = "/(\w+) (\d+), (\d+)/i"; $replacement = "\${1}1,\$3"; print preg_replace($pattern, $replacement, $string); has to be: $string = "April 15, 2003"; $pattern = "/(\w+) (\d+), (\d+)/i"; $replacement = "\${1}1,\$3"; print preg_replace($pattern, $replacement, $string); according to me. With regards, Nick Huysmans

« previous php.mirrors (#15381) next »