PHP Comment Tutorial

PHP Comment Tutorial

As a programming and scripting language PHP provides the comments in order to add description and notes to the code. This description is called a comment and not executed or interpreted by PHP. PHP comments can be used to explain the function, variable, code block, etc. Single-Line Comment with Hash Sign Similar to the other … Read more

How To Connect phpMyAdmin via “http://localhost/phpmyadmin”?

How To Connect phpMyAdmin via "http://localhost/phpmyadmin"?

The phpMyAdmin is free software written in PHP in order to manage the MySQL and MariaDB via Web interface or web page. By default, the phpMyAdmin is served via the URL “http://localhost/phpmyadmin” but in some cases, this may not work properly. In this tutorial, we list different ways to open and start a phpMyAdmin web … Read more

Display PHP Version

Display PHP Version

PHP provides different versions with different features. The latest PHP version is 7.4 as writing this post. Different versions of the PHP deployed in different platforms. The phpversion() function can be used to print currently running PHP version. phpversion() Function Syntax The phpversion() function syntax is like below. The EXTENSION parameter is optional and if … Read more

PHP str_replace() Function Tutorial

PHP str_replace() Function Tutorial

PHP provides the str_replace() function in order to replace characters or strings in a string. The str_replace() function can be also used to search in an array and replace string too. The replacement of the string occurs in every array element. The str_replace() function is case sensitive function where the uppercase and lowercase characters or … Read more

PHP Associative Arrays Tutorial

PHP Associative Arrays Tutorial

PHP programming language provides arrays in order to store multiple items in a single variable. Arrays are very useful which makes the storage, management, and manipulation of series of data easy. The PHP provides associative arrays which is a type of array. Associative arrays are used to store items as values and keys. The associative … Read more

PHP exec() – Execute Commands and Programs

PHP exec() - Execute Commands and Programs

PHP provides the exec() method in order to execute or run commands, programs, or scripts. This exec() method can simply execute external commands in the operating system. For example, the whoami command of Linux can be executed for the current user, and returned username can be used in PHP applications. The exec() Method Syntax The … Read more

array_push() and array_merge() – Append Into Array In PHP

array_push() and array_merge() - Append Into Array In PHP

PHP provides the array in order to store multiple items in a single variable. Array items can be provided during the array definition but can be also added later by using the array_push() method. In this tutorial, we will learn how to append new items into an array. array_push() Syntax The array_push() method has the … Read more