php's problem (server error)
<p>When I type this code,the server displays "Internal Server Error"</p>

<pre><code>function line($tec,$text,$array)
{

global $html;

$pos= strpos($html,$text);
$len=strlen($text);
$p=$pos;
for ($i = 0; $i &lt; count($array); $i++) 
{

if($array[$i]-&gt;get_Technique() == $tec)

{if($array[$i]-&gt;get_source() == $text)
$p=strpos($html,$text,(int)$p+$len);

if ($p===0 or $p===false or $p===""){return -1;}

}}

$pos=$p;
$result=substr($html,0,$pos);
$lineNum=substr_count($result,"\n");
return $lineNum+1  ;

}
</code></pre>

<p>what's the problem?</p>
