[ create a new paste ] login | about

Link: http://codepad.org/3pp2VO7O    [ raw code | output | fork ]

PHP, pasted on Dec 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
$star='*';
$max=10;
for($i=1;$i<$max;$i++)
{
 $last=$last.$star;
 $history[]=$last;
}
$rhistory=array_reverse($history);
$history[]=$last.$star;
$whole=array_merge($history,$rhistory);
echo implode('<br/>',$whole);
?>


Output:
1
*<br/>**<br/>***<br/>****<br/>*****<br/>******<br/>*******<br/>********<br/>*********<br/>**********<br/>*********<br/>********<br/>*******<br/>******<br/>*****<br/>****<br/>***<br/>**<br/>*


Create a new paste based on this one


Comments: