Q. Which of the following is a correct PHP syntax?

  • (A) <php> echo 'Hello'; </php>
  • (B) <?php echo 'Hello'; ?>
  • (C) <script> echo 'Hello'; </script>
  • (D) <? echo 'Hello'; ?>
πŸ’¬ Discuss
βœ… Correct Answer: (B) <?php echo 'Hello'; ?>
Explanation: Standard PHP code starts with <?php and ends with ?>.
Explanation by: Roshan
Standard PHP code starts with <?php and ends with ?>.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
8
Total Visits
πŸ“½οΈ
2 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
82%
Success Rate
" }, { "@type": "Answer", "text": "" } ], "author": { "@type": "Person", "name": "Roshan" }, "dateCreated": "2026-04-21T05:49:43+05:30" } }