Forest FireĀ (100 Marks) Challenge 1: Forest fire You are camping in a forest area at night. You are living with the forest officers to experience their challenges and hardships to create a documentary on them. Everything was going well. Suddenly, a fire has broken out in the forest and it is expanding exponentially. There is […]
The Magic Wand – TechGig PHP answer, all test cases passed. Challenge #2
The Magic Wand – TechGig PHP answer – all testcases passed The Magic Wand (100 Marks) You are a wizard who possesses the magic wand that can be used to change the values of an array. Your wand has two powers: Increase and Decrease. With each use of the wand, you can either increase or decrease […]
PHP interview Questions and Answers
What is PHP? Answer: PHP stands for Hypertext Preprocessor. It is a widely used server-side scripting language primarily designed for web development. PHP code is embedded within HTML pages and executed on the server, generating dynamic content. Explain the difference between single quotes (”) and double quotes (“”) in PHP. Answer: Single quotes (”) treat […]
A Step-by-Step Guide on How to Install PHP
Install PHP : A Step-by-Step Guide on How to Install PHP Introduction: PHP is a widely used server-side scripting language that powers countless websites and web applications. Installing PHP on your local development environment or a web server is a crucial step in getting started with PHP development. In this guide, we will walk you […]
What is PHP? Understanding PHP: The Powerhouse of Web Development
Introduction: What is PHP? Understanding PHP: The Powerhouse of Web Development: In the world of web development, PHP stands tall as one of the most widely-used and influential scripting languages. From simple personal websites to complex enterprise applications, PHP has played a vital role in shaping the modern web. In this blog post, we will […]
Complete Php form example
Here we are going to check how to create a php form and insert its values to database table. In this example we will be submitting the php form to same page. Form HTML : Here action is set to same page using <?php echo $_SERVER[‘PHP_SELF’]; ?>. Click here to know more abount PHP_SELF. Method […]
Removing strings or non-integer values from an array in PHP – Simple and Easy Method
Removing non-integer entries from array in php Here we are going to discuss how to remove strings or non-integer values from an array in php. For this we need to use one simple array function in php called array_filter() . it always filters an array using a callback function. Syntax : Parameters : array :- […]
Reverse String – Qawall
Write a program to reverse string in php We can reverse string in php using the php string function strrev() and without using the string function. Let’s check one by one. Example : string = HELLO WORLD , reverse = DLROW OLLEH Program 1 : using strrev() Click to know more about strrev() Output : […]
Palindrome Number In PHP – simple and easy method
Write a program to find the number is Palindrome number in PHP A number is called Palindrome when its reverse is same as the orginal number. Eg:- Number = 12321, Reverse = 12321 Both the number and reverse is same thus its called as a palindrome number. Let’s check how to program palindrome number in […]
Fibonacci Series
Write a program to find the fibonacci series in php. In Fibonacci series each number is the sum of the preceding ones. Eg:- 0 1 1 2 3 5 8 13 121start with 0 and 1, then0+1 = 1, 1+1 = 2, 1+2 = 3, so on Program : Define $num = 0, $num1 = […]