SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <<<__html_end ???

    hi,

    I need a way to clean my coding up. Although it works fine it also resembles a bomb site with a lot of echos mixed in the html.

    I noticed this:

    PHP Code:
    <<<__HTML_END 
    in some code lately and it seemed a good way to do things but i cant find a good resource of info on it. It seems to allow the use of html and variables together

    Could anyone explain it? is it good practice?

    Im also just starting to use some pear templating packages which seem remedy the problem but i'd also like to know how this works.

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's called the HEREDOC syntax and is described in the PHP manual.
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. dammit! Why didnt i look there!

    I think thats pretty handy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •