Which of the following are true about strings in PHP?
- Strings can be concatenated using the dot (.) operator.
- Strings in double quotes ("") allow for variable interpolation.
- Strings can be accessed using array-like indexing.
- All of the above
All of the given options are true about strings in PHP. Strings can be concatenated using the dot (.) operator to join multiple strings together. Strings enclosed in double quotes ("") allow for variable interpolation, where variables can be directly included within the string. Additionally, strings in PHP can be accessed using array-like indexing, allowing you to access individual characters by their position. Learn more: https://www.php.net/manual/en/language.types.string.php
Loading...
Related Quiz
- In PHP, you can define a constructor in a class using the __construct() keyword.
- How can you set a cookie in PHP?
- In PHP, the * operator is used for ______.
- The while loop in PHP will continue to execute a block of code as long as the ______ is true.
- Which of the following are true about PHP data types?