Thursday, June 26, 2014

Print Triangle using Php

<?php

function triangle($t=10) {

for($j=(10-$t)/2;$j>0;$j--){ echo " "; }
for($i=$t;$i>=0;$i--){
echo "*";
}
echo "\n";
if($t>1)triangle($t-2);
}
triangle();
?>

Bind Some Event to Element and trigger that function when click the element

Scenario: Suppose if we used same click event function in various web pages. if you want do some logic some page button for that need to re...