A developer wants to store multiple values in a single variable. Which of the following data types in PHP should he/she use?
- Array
- String
- Integer
- Object
To store multiple values in a single variable, an array should be used in PHP. Arrays can hold various data types and are versatile for handling collections of data.
Loading...
Related Quiz
- The foreach loop in PHP is used exclusively for ______.
- PHP supports eight primitive data types.
- How can you determine if a variable is an array in PHP?
- You need to create a file in your PHP script, write to it, and ensure that the file is closed properly after writing. How would you do this?
- The do...while loop in PHP tests the condition before executing the block of code.