Create dynamic Pattern using PHP code

<html>

<head>

<title> Dynamic Pattern </title>

</head>

<body>

<form action="" method="GET">

<?php

for($i=0;$i<=50;$i++)

{

echo "&nbsp";

}

?>

Enter Number:<input type="textbox" name="no"><br><br>

<?php

for($i=0;$i<=50;$i++)

{

echo "&nbsp";

}

?>

    <input type="submit" value="Submit" name="sub">

    </form>

</body>

<?php 

$n=$_REQUEST['no'];

if(isset($_REQUEST['sub']))

{echo "<center><font size='10'>";

for($i=1;$i<=$n;$i++)

{

for($j=1;$j<=$n;$j++)

{

if($i==1 || $i==$n || $j==1 || $j==$n)

echo " # ";

else

echo " * ";

}

echo "<br>";

}

}

?>

</html>

Comments

:skin :include name='super.defaultAdUnit'/>