SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    heredox syntax and tabbing code not compatible

    I use tabs for indentation and code clarity. But with the heredoc syntax, you cannot indent the closing identifier. I like using heredoc, especially for email contents, but it makes my code look ugly because it is always at the left-aligned even when nested within if statements and so on. Does anyone have any suggestions for using heredoc (or perhaps an alternative I don't know about) and retaining good-looking code?

  2. #2
    SitePoint Enthusiast abdussamad's Avatar
    Join Date
    May 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an external template file for this sort of thing.

    Also you can indent almost all the code. Only the closing identifier has to be left aligned.


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
  •