OutPut: 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 15 20 25 Code: <?php // Your code here! for($i=1;$i<=5;$i++){ echo $i;// $i as row for($j=1;$j<5;$j++){ //…
OutPut: 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 15 20 25 Code: <?php // Your code here! for($i=1;$i<=5;$i++){ echo $i;// $i as row for($j=1;$j<5;$j++){ //…
Adding anonymous function and call the public variable in an anonymous function by using magic function called __invoke(); <?php // Your code here! class model { public $greet; public $a =”hello”; function __construct() { $this->greet = function(){ echo $this->a;…
We can use strrpos function to find the position of the string and use substr function to insert the particular string in particular position. <?php $html = "\html/Please Click Here to Complete Questionnaire/html/" $str_to_insert = "pramodh"; $pos = strrpos($html,"Please Click…
Hi Friends I was working on yii2 framework project in which i as working on delivery date in which it should skip shipping or delivery date on sunday as saturday is also working day,so i came up with idea to…
You must be logged in to post a comment.