01.
<form action=
""
method=
"Post"
>
02.
<table>
03.
<tr><td>INPUT : <input type=
"text"
name=
"h"
size=
"35"
><input type=
"submit"
name=
"submit"
value=
"OK"
></td></tr>
04.
05.
</table>
06.
</form>
07.
08.
<?php
09.
if
(isset(
$submit
)) {
10.
11.
for
(
$i
=1;
$i
<=
$h
;
$i
++){
12.
for
(
$j
=1;
$j
<=
$h
-
$i
+1;
$j
++){
echo
" "
;}
13.
for
(
$j
=1;
$j
<=
$i
;
$j
++){
echo
"*"
;}
14.
echo
"*"
;
15.
for
(
$j
=
$i
;
$j
>=1;
$j
--){
echo
"*"
;}
16.
17.
echo
"<br>"
;
18.
}
19.
}
20.
?>