Master variable interpolation and concatenation, the two ways to add a variable to a string in PHP, and learn when to use each.
Category: PHP
How to Check a Variable’s Type in PHP
So, you want to know how to determine a variable’s data type in PHP? Read on; this tutorial will show you how!
How to Get the Domain Name in PHP
Are you wondering about the best way to get the domain name from the current URL? Read on; this tutorial will help.
How to Check If a String Contains a Substring in PHP
Learn how to check if a string contains a given substring in PHP, with or without case sensitivity — and more.
How to Check for Null in PHP
Not sure how to check for null values in PHP? This tutorial will show you the two best ways to do it, with code examples and without the B.S.
How to Comment Out PHP
Learn how to comment out PHP code and find out the most common mistakes to watch out for.
How to Echo an iFrame in PHP
Trying to figure out how to echo an iframe in your PHP code? Here are the three ways to get it done, with code samples.
Pass PHP Array to JavaScript (Tutorial)
It turns out you can get PHP and JavaScript to agree on something, and that something is the JSON data format.
How to Initialize an Empty Array in PHP
These are the two best ways to initialize an empty array in PHP.
Check If a Variable Is a String in PHP
The best way to check if a variable is a string or not in PHP.
How to Add a New Line in PHP (Line Breaks, Explained)
We explore some of the best ways to add a line break to a string in your PHP code.
Calling a JavaScript Function From PHP?
Trying to call a JavaScript function from PHP? Nine times out of ten, you will want to do this instead.
How to Check If a File Exists in PHP
The best way to check if a file or directory exists in your PHP application.