Multiple choice php

PHP server scripts are surrounded by delimiters, which?

  1. <?php>...</?>

  2. <?php…?>

  3. <script>...</script>

  4. <&>...</&>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

PHP code is embedded in HTML using opening delimiters. This tells the server to parse everything between these tags as PHP code. The correct syntax is without any angle brackets on the closing tag. Option B shows the correct delimiter syntax.

AI explanation

PHP code embedded in a file is marked off with the delimiters to close, so the interpreter knows where PHP code starts and stops within an otherwise plain HTML/text file. The tag is used for client-side JavaScript, not server-side PHP, and the other bracket styles shown aren't valid PHP syntax at all.