PHP is a popular server scripting language known for creating dynamic and interactive web pages.
PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program.
This tutorial will guide you through installing PHP 7.4 on Ubuntu and setting up a local programming environment via the command line.
PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program.
This tutorial will guide you through installing PHP 7.4 on Ubuntu and setting up a local programming environment via the command line.
PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program.
This tutorial will guide you through installing PHP 8.1 on Ubuntu and setting up a local programming environment via the command line.
The “Hello, World!” program is a classic and time-honored tradition in computer programming. This tutorial will walk you through writing a “Hello, World!” program in PHP.
A string is a sequence of one or more characters that may consist of letters, numbers, or symbols. In this article, you will learn how to create and view the output of strings, use escape sequences, concatenate strings, store strings in variables, and the rules of using quotes, apostrophes, and newlines within strings in PHP.
In PHP, as in all programming languages, data types are used to classify one particular type of data. This is important because the specific data type you use will determine what values you can assign to it and what you can do to it (including what operations you can perform on it). In this tutorial, we will go over the important data types native to PHP. This is not an exhaustive investigation of data types, but will help you become familiar with what options you have available to you in PHP.
Being able to effectively perform mathematical operations in programming is an important skill to develop because of how frequently you’ll be working with numbers. This tutorial will go over many different operators that can be used with numerical data types in PHP, as well as how PHP handles “type juggling” and built-in math functions.
Decisions written in code are formed using conditionals. “If x, then y.” This tutorial will start with an overview of comparison operators that will be used to build conditional statements. Next, it will take you through writing conditional statements in PHP, including the if, else, and elseif keywords. This also includes combining conditions using the logical operators of “and” or “or”. Finally it will also cover some special conditional operators to more precisely describe a situation.
When you find yourself copying and pasting blocks of code to reuse in different sections of your program, you’re ready to write a function. In this tutorial, you will work with all the different pieces of a function: user-defined functions, arguments, parameters, default values, and passing by reference. We’ll discuss scope, which lets you manipulate the specific section of your code that needs to change. Finally we’ll take a look at the various built-in functions provided by PHP.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.