Home >Backend Development >PHP Tutorial >Introduction to how to create an array in php
PHP does not need to specify the size of an array when creating it. Since PHP is a loosely typed language, you don't even need to declare an array before using it. Although there are no strict restrictions, PHP still provides formal and informal array declaration methods.
php does not need to specify the size of an array when creating it. Since PHP is a loosely typed language, you don't even need to declare an array before using it. Although there are no strict restrictions, PHP still provides formal and informal array declaration methods. This article will introduce two methods of creating php arrays for your reference. Method 1: Create an array directly using the assignment method
Next we create an array containing the script school name:
For example:
|