
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1060 Articles for PHP

4K+ Views
Problem Description Given the length and breadth of a rectangle, we need to implement a PHP program to find the perimeter. A rectangle is a closed two-dimensional figure having 4 sides. The opposite sides are equal and parallel. The angle made by the adjacent side is equal to 90 degrees. The perimeter is the sum of all sides; in other words, the perimeter is two times the sum of length and breadth. In this tutorial, we are going to learn how we can find the perimeter of a given rectangle in PHP using different approaches. Formula of Perimeter of ... Read More

3K+ Views
Armstrong Number Armstrong number is a number in which the sum of its digits raised to the power of the number of digits is equal to the number itself. In this article, we are going to discuss how we can check if a given number is Armstrong number or not. Examples Let's understand Armstrong's Number with the help of some input-output examples. Input 9474 Output Yes Explanation This is a four digit-number. The digit in this number are 9, 4, 7 and 4. 9474 = 94 + 44 + 74 + 44= 6561 + 256 + 2401 + 256= ... Read More

298 Views
In this article, we will see how to get selected option values in PHP, with necessary examples. What is "option value" in PHP? Drop-down menus are created by using the and . PHP allows users to select one or more options from a list. Syntax Below is the syntax of the Option Value in PHP − Text Label-1 Text Label-2 . . . The characteristics related with the tag are − Multiple: This is used to choose multiple choices from a list. ... Read More

1K+ Views
This article explains how to handle XML documents in PHP. XML (eXtensible Markup Language) is defined as a textual markup language designed for both people and computers. It is a format used for storing and moving data between applications. PHP simplexml_load_string() function provided by PHP allows us to parse XML strings with ease and this function will convert XML string into an object for us which can be examined in order to understand XML data. Usong PHP simplexml_load_string() Method PHP simplexml_load_string() function accepts an XML string and returns a SimpleXMLElement object, the object has properties and methods that will ... Read More

5K+ Views
Arrays are linear data structures used to handle data in programming. Sometimes while dealing with arrays we need to add new elements to an existing array.In this article, we will discuss several methods to add elements to the end of an array in PHP, complete with code examples, outputs, and an analysis of the time and space complexity of each approach. Following are different approaches to adding elements to an array − Using square brackets [] We add an element to the end of an array in PHP is by using square brackets []. This syntax is only suitable when ... Read More

152 Views
To force PHP to use strings for array keys is quite easy, as in PHP array keys are automatically stored as integers if the array elements are numbers. If they are not numbers then it will cast to strings. Forcing PHP to Use strings for Array Keys Following are the ways to force PHP to use strings for array Keys Using php array() function Using json_encode() function Using php array() Function If you use the array() function and keep the first key in quotes it will take other keys as a string does not matter if you are ... Read More

1K+ Views
Given task is to find all the students with marks greater than average marks using SQL. i.e. if the marks of students in a class are 65, 75, 89, 92, and, 60 then the average would be 76.2 and, the query should return records with the marks 89 and 92. Let's start step by step. Creating a Table First of all, we need to create a table called Students using the CREATE statement. This table has three columns Student_Id, Subject, and Marks. This table stores three types of subjects, and marks range from 0 to 100 − CREATE TABLE ... Read More

311 Views
To use PHP in HTML, you must enclose the PHP code with PHP start tag . In this article from the example we will learn to use and become comfortable with PHP in HTML. PHP (Hypertext Preprocessor) is a popular server-side scripting language used for web development. It allows you to embed dynamic content into your HTML. Approach to use PHP in HTML To effectively use PHP in HTML, you need to enclose PHP code within tags. Remember, PHP files must have a .php extension since PHP code is processed on the server before the page is ... Read More

655 Views
Introduction Navigating through database operations in XAMPP can be challenging, particularly for beginners. Realizing this complexity, over 15 million active monthly users have turned to XAMPP for its ease of use and flexibility. This article offers a step-by-step guide on performing basic database operations in XAMPP, from data insertion to deletion. Let's take the first stride towards mastering your XAMPP database management skills together! Basic DataBase Operations in XAMPP Basic DataBase Operations in XAMPP include performing CRUD operations such as select, insert, update, and delete statements on a MySQL database using PHP. SELECT Statement The SELECT statement is a ... Read More

450 Views
Hosting websites and online applications requires setting up a web server infrastructure. In this article, we'll try to understand the setting up of Nginx on Fedora 24 Server and Workstation using MariaDB and PHP/PHP-FPM. This combination creates a strong stack for managing databases and presenting dynamic content. The main concepts covered here can be applied to subsequent versions of Fedora or other Linux distributions, even if Fedora 24 is an older edition. Main Characteristics of Fedora 24 Server Fedora 24 Server was created using the Linux kernel, which serves as the foundation of the operating system. The Linux kernel offers ... Read More