Q. What will be the output of the following PHP code?

Code:
<?php
$cars = array(
    "BMW",
    "Mercedes",
    "Honda",
);

foreach ($cars as $c)
{
    echo "$c ";
}
?>
  • (A) BMW Mercedes Honda
  • (B) Honda Mercedes BMW
  • (C) SyntaxError
  • (D) TypeError
πŸ’¬ Discuss
βœ… Correct Answer: (A) BMW Mercedes Honda

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
236
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
87%
Success Rate