How to achevie the Polymorphism progarmme in PHP?
<p>Hi, I'm trying to write code to achieve php polymorphism. I don't know where there is a mistake in the code. It shows the error in "Fatal error: Cannot redeclare Sample::a() ". Here is my code. Kindly solve this problem.</p>

<pre><code> &lt;?php
 class Sample
{
public function a()
{
 echo "hi";
}
public function a($chr)
{
 for ($chr=0;$chr&lt;10;$chr++)
 echo $chr;
}
 public function a($b,$c)
 {
for($g=$b;$g&lt;$c;$g++)
echo $g
}
}

$s=new Sample();
$s-&gt;a();
$s-&gt;a($chr);
$s-&gt;a(1,10);
?&gt;  
</code></pre>
