Create a pattern like this using php?
keralam
kerala
keral
kera
ker
ke
k
kerala
keral
kera
ker
ke
k
$state=array('k','e','r','a','l','a','m');
for($i=6;$i>=0;$i--)
{
$st='';
for($j=$i;$j>=0;$j--)
{
$st=$state[$j].$st;
}
echo $st.'</br>';
}
echo "</br>";
?>
No comments:
Post a Comment