Creating and handling dates with PHP date

Next, we will see how to use PHP’s date function and how to format it to be displayed: Content: Introduction In PHP we can both create and format a date using the date() function. Its syntax is as follows: date ( string $format [, int $timestamp = time() ] ) : string As you can […]

read more
PHP using namespaces

What are namespaces? In their most widely accepted definition, namespaces are a way to encapsulate elements.

read more
Using file_get_contents() in PHP

The function file_get_contents is used to read a file into a string, and it returns [value]false[/value] if it fails

read more
Installing PHP modules in Apache on Linux

Today I was doing some updates on the server and realized that not much is said about this topic, so I decided to talk about how to install PHP modules on Linux.

read more
PHP heredoc and nowdoc

Before talking about heredoc or nowdoc, we need to know that they are different ways to specify a string in PHP. Maybe I should have talked about this topic in the section about variables, but it would be too long for someone to read quickly.

I came up with this post while creating an article about the DOMDocument class in PHP, which is quite long. However, it is designed to help you find what you need to know quickly. I don’t expect anyone to read the entire post.

read more
PHP isset function

Check if a variable is defined and not null, so, if the variable is not defined it will return false, if the variable is null it will return false. If the variable is defined, it will return true.

read more
PHP Traits (OOP)

PHP traits are a methodology for code reuse that allows us to group functions, but don’t get me wrong, these groupings are not inside the class, you can use the same grouping in different classes.

read more
PHP Constants

A constant is a value to which we assign a name, and this value will not change. For example, consider a value of a tax such as VAT.

Constants are often used in WordPress configuration as an example. Here’s how to define a constant. By convention, the name of the constant is recommended to be in uppercase. A constant distinguishes between uppercase and lowercase letters.

read more
PHP Range function

Creates an array that contains a range of elements from $start to $end.

Example: if my start value is 0 and the $end value is 70 and my step value is 10 the values of my array elements are: 0, 10, 20, 30 ,40, 50, 60, 70.

read more
PHP fgetcsv function

The fgetcsv function gets line from file pointer and parse for CSV fields

read more