<?php
$first="rahul";
$second="shiva";
for($i=0;$i<strlen($first);$i++)
{
for($j=0;$j<strlen($second);$j++)
{
if($first[$i]==$second[$j])
{
$first= "".substr($first,0,$i).substr($first,$i+1,strlen($first));
$second= "".substr($second,0,$j).substr($second,$j+1,strlen($second));
$i--;
$j--;
}
}
}
$len= Strlen($first) + strlen($second);
$f="friends";
$duplen=1;
for($i=0;(strlen($f)!=1);)
{
if($len!=$duplen)
{
if($i==(strlen($f)))
{
$i=0;
}
else
{
$i++;
}
$duplen++;
}
else
{
$f=substr($f,0,$i).substr($f,$i+1,strlen($f)-1);
}
}
?>
i am not finding any mistake in the above code but its not getting executed.
its giving an error
"Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\check.php on line 59 "
i hope i will be helped pls