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 moreWhat are namespaces? In their most widely accepted definition, namespaces are a way to encapsulate elements.
read moreThe function file_get_contents is used to read a file into a string, and it returns [value]false[/value] if it fails
read moreToday 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 moreBefore 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 moreCheck 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 morePHP 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 moreA 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 moreCreates 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 moreThe fgetcsv function gets line from file pointer and parse for CSV fields
read more