Coding & Programming > PHP Forum

SGML Style

(1/1)

beingchinmay:
The “classic” style of embedding PHP comes from SGML instruction processing tags. To use this method, simply enclose the PHP in <? and ?>. Here’s the “Hello world” example again:


--- Quote ---<? echo "Hello, world"; ?>
--- End quote ---

This style, known as short tags, is the shortest and least intrusive, and it can be turned off so as to not clash with the XML PI(Process Instruction) tag in the php.ini initialization file. Consequently, if you want to write fully portable PHP code that you are going to distribute to other people (who might have short tags turned off), you should use the longer <?php ... ?> style, which cannot be turned off. If you have no intention of distributing your code, you don’t have an issue with telling people who want to use your code to turn on short tags, and you are not planning on mixing
XML in with your PHP code, then using this tag style is okay.

saravjeet:
SGML (Standard Generalized Markup Language) is a standard for how to specify a document markup language or tag set. Such a specification is itself a document type definition (DTD). SGML is not in itself a document language, but a description of how to specify one.

Lishmalinyjames:
SGML can be used for publishing in its broadest definition - from single medium conventional publishing on paper to on-line multi-media database publishing. SGML can be used to produce files which can be read by people, and exchanged between machines and applications in a straightforward manner.

saravanan28:
The Standard Generalized Markup Language (SGML, defined in [ISO8879]), is a language for defining markup languages. HTML is one such "application" of SGML. An SGML application consists of several parts: The SGML declaration. The SGML declaration specifies which characters and delimiters may appear in the application.

Navigation

[0] Message Index

Go to full version