Found 1466 Articles for PHP

Performing DataBase Operations in XAMPP

sudhir sharma
Updated on 22-Jan-2024 17:04:55

14 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

Setting Up Nginx with MariaDB and PHP/PHP-FPM on Fedora 24 Server and Workstation

Ayush Singh
Updated on 03-Aug-2023 14:54:08

284 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

Setting Up LEMP Linux, Nginx, MySQL/MariaDB, PHP) and PhpMyAdmin on Ubuntu 15.04 Server

Ayush Singh
Updated on 03-Aug-2023 14:38:31

254 Views

LEMP stack is a powerful combination of open source technology used for Web development and hosting. LEMP comprises Linux, which is the operating system in the combination, Nginx (pronounced as engine x) is a web server software, used to handle HTTP requests from servers, it helps the delivery of static and dynamic content. MySQL or MariaDB are used for efficient data storage and retrieval and PHP is used to construct dynamic web applications, enabling developers to communicate with databases and integrate dynamic information into HTML pages. Installing and configuring each component of LEMP, one at a time is required to ... Read More

Setting Up LAMP (Linux, Apache, MySQL/MariaDB, PHP and PhpMyAdmin) in Ubuntu Server 14.10

Ayush Singh
Updated on 03-Aug-2023 14:34:59

217 Views

Setting up LAMP (Linux, Apache, MySQL/MariaDB, PHP, and PhpMyAdmin) in Ubuntu Server 14.10 includes putting in and configuring an effective net improvement stack. LAMP affords an entire environment for growing and deploying dynamic web sites and net programmes. Linux serves as the running system, offering a strong and steady basis for the stack. Apache acts as the net server, managing incoming requests and serving net pages. MySQL/MariaDB serves as the relational database control system for storing and dealing with data. PHP is the scripting language used for dynamic content generation. Additionally, PhpMyAdmin is established as a net-primarily based total management ... Read More

Setting Up LAMP (Linux, Apache, MariaDB and PHP) on Fedora 24 Server

Ayush Singh
Updated on 03-Aug-2023 14:32:04

152 Views

Follow these instructions to install LAMP (Linux, Apache, MariaDB, and PHP) on a Fedora 24 server. First, perform a minimum installation of Fedora 24. Install the necessary components, including PHP, MariaDB, and Apache, after updating the system. Activate the automatic startup of the Apache server and permit incoming HTTP traffic over the firewall. Set a strong root password, activate the MariaDB service, and safeguard the installation. Set PHP settings appropriately for your needs. By creating a straightforward PHP file and using a web browser to view it, you may test the LAMP architecture. After completing these procedures, your Fedora 24 ... Read More

How to display logged-in user information in PHP?

Dishebh Bhayana
Updated on 03-Aug-2023 18:59:08

840 Views

In this article, we will learn how to display logged-in user information using PHP and its various inbuild methods. When building a web application that requires authentication, it is often necessary to display the logged-in user's information on various pages. This could be useful in applications such as e-commerce websites, banking websites, and more. We can implement this with the help of PHP and its functions. Let’s understand this with the help of some examples. Example 1 In this example, we will create a login/logout system wherein the user will get authenticated once he is logged in, and will ... Read More

How to Display Data from CSV file using PHP?

Dishebh Bhayana
Updated on 02-Aug-2023 20:18:08

1K+ Views

In this article, we will learn how to display data from a CSV file using PHP using fgetcsv(), str_getcsv and SplFileObject functions. CSV file is a simple file format used to store data with comma-separated values, and each row in it represents a record in the tabular data. To read a CSV file using PHP, we will use the fgetcsv() function which reads a line from a CSV file and returns an array of values representing the CSV data present in that line. Let’s understand this with the help of an example below − Example 1 In this ... Read More

Sorting Arrays in PHP

Pradeep Kumar
Updated on 02-Aug-2023 12:53:13

876 Views

What is Sorting? Sorting is the process of arranging a collection of items or data elements in a particular order, usually based on some predefined criteria. It is a fundamental operation in computer science and is used extensively in various algorithms and applications. The purpose of sorting is to bring organization and structure to a set of data so that it can be easily searched, accessed, or presented in a meaningful way. By arranging the data in a specific order, sorting allows for efficient searching, comparison, and retrieval operations. Sorting can be performed on various types of ... Read More

Sort Array of Objects by Object Fields in PHP

Pradeep Kumar
Updated on 02-Aug-2023 12:44:10

1K+ Views

There are several ways to sort an array of objects by object fields in PHP. Here are some common approaches: Using usort() function with a custom comparison function Implementing a custom sorting algorithm Utilizing the array_multisort() function Using usort() Function with a Custom Comparison Function Here's an example of using the usort() function with a custom comparison function to sort an array of objects by object fields in PHP: // Custom comparison function function compareByField($a, $b) { // Replace 'fieldName' with ... Read More

Sort a Multidimensional Array by Date Element in PHP

Pradeep Kumar
Updated on 02-Aug-2023 12:38:50

2K+ Views

In PHP, you can sort a multidimensional array by a specific element, such as a date, using various approaches. Let's explore a few different methods. Using array_multisort() Using a custom comparison function Using the array_multisort() function with a callback Using array_multisort() Here's an example of sorting a multidimensional array by a date element using array_multisort(): $multiArray = array( array('date' => '2023-06-01', 'name' => 'John'), array('date' => '2023-05-15', 'name' => 'Alice'), array('date' => '2023-06-10', 'name' => ... Read More

1 2 3 4 5 ... 147 Next
Advertisements