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
PHP compact() function

Today we are going to see compact() function on PHP, although it seems pretty simple what it does, it could help you to save time and will also make your code a bit more verbose.

read more
PHP implode

PHP implode function permit us convert an array into a String, but the term correct is that impode make a join between the array elements using a string as glue $glue and giving back a string as return.

read more
PHP explode

PHP explode is practically the opposite of implode. This divides a string in substrings that are stored in an array

read more
Sending Emails with PHP

On this post I’m going to explain how to send Email with PHP, at first this post was thought to touch function mail() only, but this probably is not the best tool to send emails in your situation, so I’ll divide this post in 3, this and 2 other post writing about how to send email with PHPMailer and CURL.

read more

Comments