No Image

Social Widgets for Websites

Social Widgets for Websites When you build a website you may need social media like button, subscription button, survey widgets and follow buttons. Further,  to add these widgets in WordPress, you can easily install plugins. However,…


No Image

Earn Money from The Internet

Earn Money from The Internet The Internet is full of opportunities and one can earn money from it. Furthermore, you have to work to get the money it is not like gambling. This is the…


No Image

Print Star Triangles in PHP

Print Star Triangles in PHP <?php $nr=10; //Number of rows for($i=1; $i<=$nr ; $i++) // Outer loop { for($j=1; $j<=$i; $j++) // Inner loop { echo “*”; } echo “n”; // Statement for new line…


No Image

Sum of Natural Numbers in PHP

Sum of Natural Numbers in PHP <?php $n=5; // Initialises n to 10 for sum of natural no. up to 10 $sum=0; for($i=1;$i<= $n; $i++) { $sum = $sum +$i; // This statement execution i…


No Image

Calculate Factorial in PHP

Calculate Factorial in PHP <?php $n=5; // For calculating factorial of 5 $fact=1; // Initialising value of fact to 1 for($i=1; $i<=$n; $i++) { $fact = $fact * $i; // This statement i will explain…


No Image

Switch Statement in PHP

Switch Statement in PHP <?php $var=3; // Assings 1 to variable var switch($var)// Switch statement that takes an argument { case 1:      // If the value of var is 1 echo ” This…


No Image

For Loop in PHP

For Loop in PHP Code Comment <?php //PHP opening tag for( $i=0; $i <= 20; $i++){ //First $i=0 is initialization $i <= 20 is condition check and $i++ is increment if($i%2==0){ //Check whether i is…


No Image

Print Even Numbers in PHP

Print Even Numbers in PHP <?php $i = 1;  // Statement initialises i to 1 echo “This will print even numbers between 1 to 11”; // Prints the statement in double quotes while($i <= 11)…


No Image

Conditional Statements in PHP

Conditional Statements in PHP <?php $a =10;                  // This statement assigns 10 to a $b = 15;               //This statement assigns 15…


No Image

What is Google Webmaster?

What is Google Webmaster? Google Webmaster or Search Console that helps you to look insight into your website. Such as, how many URL are indexed. How many back links your website have?  What is your…