syntax error
| From: | John Taylor-Johnston | Date: | Tue, 04 Mar 2003 23:33:10 +0000 |
| Subject: | syntax error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138191@lists.php.net to get a copy of this message | ||
Sigh :) It all works so much better if I use:
if(eregi('^au: (.*)$',$line,$m)) {
But I want to use a function. But nothing is returned. So what did I do wrong now?
----------snip------------
echo filter_strings("au:");
function filter_strings($tofilter){
echo $tofilter."<br>";
# if(eregi('^$tofilter (.*)$',$line,$m)) {
if(eregi('^'.$tofilter.' (.*)$',$line,$m)) {
$filtered=$m[1];
echo "aa $filtered<br>";//nothing echoes.
return $filtered;
}
}