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
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *