Results 1 to 3 of 3

The heredoc syntax

This is a discussion on The heredoc syntax within the Programming forums, part of the Web Designing & Development category; In addition to the single-quote and double-quote syntaxes, PHP offers another way to specify a string, called the heredoc syntax. ...

  1. #1
    Senior Member chinmay.sahoo's Avatar
    Join Date
    Dec 2013
    Location
    Banglore
    Posts
    266

    Thumbs up The heredoc syntax

    In addition to the single-quote and double-quote syntaxes, PHP offers another way to specify a string, called the heredoc syntax. This syntax turns out to be extremely useful for specifying large chunks of variable-interpolated text, because it spares you from the need to escape
    internal quotes. It is especially useful in creating pages that contain HTML forms.

  2. #2
    Member
    Join Date
    Nov 2016
    Posts
    39

    Default Re: The heredoc syntax

    How to use heredoc in PHP. Complete syntax and code examples.

  3. #3
    Senior Member charlottegracie's Avatar
    Join Date
    Jan 2017
    Posts
    207

    Default Re: The heredoc syntax

    A third way to delimit strings is the heredoc syntax: <<<. After this operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation. The closing identifier must begin in the first column of the line.