在一个字符串中查找另一个字符串

htmlheadtitle正则表达式/title/headbodya href=./返回列表/abrform action=?echo $PHP_SELF;? method=post在input type=text name=string value=?echo $string;?中查找input type=text name=query value=?echo $query;?brinput type=radio name=where value= ?if(!isset($where) or $where==) echo checked;?第二个字符串可以在第一个字符串的任何位置brinput type=radio name=where value=^ ?if(isset($where) and $where==^) echo checked;?第一个字符串以第二个字符串开始brinput type=radio name=where value=$ ?if(isset($where) and $where==$) echo checked;?第一个字符串以第二个字符串结束brinput type=checkbox name=case value=case ?if(isset($case)) echo checked;?区分大小写brinput type=submit value=查询/form?if(isset($string) and isset($query) and $string and $query){ if(isset($case)){ $func = ereg; } else{ $func = eregi; } switch($where){ case ^: $query = ^ . $query; break; case $: $query .= $; break; } eval(/$found = $func(/$query/,/$string/);); if($found){ echo 找到!; } else{ echo 未找到!; }}?/body/html