#22. Nested Loop In PHP Get link Facebook X Pinterest Email Other Apps Aqib Saeed Aqib Saeed June 24, 2022 Nested LoopWorking:Run Code:<?phpfor($a = 1; $a <=100; $a= $a+10){ for($b = $a; $b < $a + 10; $b++){ echo $b . " ";}echo "<br>";}?> Get link Facebook X Pinterest Email Other Apps Comments
#30. PHP Recursive Function Aqib Saeed Aqib Saeed June 25, 2022 Recursive Function Syntax: Run Code: Recursive Function <?php // function display($num){ // if($num <= 5){ // echo "$num <br>"; // display($num+1); // } // } // display(1); ?> --Factorial Number-- function fact ( $a ) { if ($a == 0 ){ return 1 ; } else { return ($a * fact($a - 1 )) ; } } echo fact( 5 ) ; ? > Working: Read more
#90. PHP Date_add, Date_sub & Date_modify Function Aqib Saeed Aqib Saeed July 01, 2022 How to work PHP Date_add, Date_sub & Date_modify Function? Syntax: Run Code: <?php $date = date_create( "2012-03-23" ) ; // date_add($date, date_interval_create_from_date_string("30 days")); // date_sub($date, date_interval_create_from_date_string("30 days")); date_modify($date , "6 days" ) ; echo date_format($date , "d-m-Y" ) ; ? > Read more
Comments
Post a Comment