What is the syntax to declare an array in PHP?
<>/array( , , ...) <>/array[ , , ...] [ , , ...] - array(
, , ...)
The syntax to declare an array in PHP is array(, , ...). Alternatively, you can also use the shorthand syntax [, , ...]. The values can be of any data type, and they are separated by commas. The array can be assigned to a variable or used directly in the code. Learn more: https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax
Loading...
Related Quiz
- What is the difference between the functions strstr() and stristr()?
- What is the else statement used for in PHP?
- You should always close a file in PHP using the fclose() function after you're done with it.
- How do you insert data into a MySQL table using PHP?
- What can happen if a required field is left empty in a PHP form?