Re: cvs: php-src / NEWS /ext/pcre php_pcre.c php_pcre.h/main SAPI.c /win32 sendmail.c
| From: | Nuno Lopes | Date: | Sat, 12 Mar 2005 13:41:37 +0000 |
| Subject: | Re: cvs: php-src / NEWS /ext/pcre php_pcre.c php_pcre.h/main SAPI.c /win32 sendmail.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-30899@lists.php.net to get a copy of this message | ||
Just one question:
Why do you need to initialize the $count var?
<?
$text = '124 35 dgg gg 466';
//$count=0;
echo preg_replace('/(\d)/', '"\1', $text, -1, $count);
echo "\n$count";
?>
prints:
Notice: Undefined variable: count in /transfer/test.php on line 4
"1"2"4 "3"5 dgg gg "4"6"6
Notice: Undefined variable: count in /transfer/test.php on line 5
If you remove the comments in $count=0, it works...
Nuno