Q. What will be the output?

Code:
$a = 'abc';
echo $a[1];
  • (A) a
  • (B) b
  • (C) c
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) b
Explanation: String offset access works like array.
Explanation by: Roshan
String offset access works like array.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
37
Total Visits
πŸ“½οΈ
5 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
97%
Success Rate