Loading ...
Sorry, an error occurred while loading the content.

HTML Highlighting in PHP

Expand Messages
  • knghtjd
    How can this be done? I heard that some editors highlight in html highlighting when you use: echo
    Message 1 of 5 , Sep 28, 2004
    • 0 Attachment
      How can this be done?
      I heard that some editors highlight in html highlighting when you use:
      echo <<<HTML
      some html sode...
      HTML;
    • Justin Watt
      see: how do i make editplus correctly highlight php heredoc strings? http://justinsomnia.org/2004/07/editplus-customizations-faq.html --justin
      Message 2 of 5 , Sep 29, 2004
      • 0 Attachment
        see: how do i make editplus correctly highlight php heredoc strings?

        http://justinsomnia.org/2004/07/editplus-customizations-faq.html

        --justin


        On Wed, 29 Sep 2004, knghtjd wrote:

        > How can this be done?
        > I heard that some editors highlight in html highlighting when you use:
        > echo <<<HTML
        > some html sode...
        > HTML;
        >
        >
        >
        >
        > http://www.editplus.com
        > http://groups.yahoo.com/group/editplus
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      • knghtjd
        Thanx, but it s not what I was looking for. What I want is that when, for example ,you use the following code, the html code would be highlighted like normal
        Message 3 of 5 , Sep 29, 2004
        • 0 Attachment
          Thanx, but it's not what I was looking for.
          What I want is that when, for example ,you use the following code,
          the html code would be highlighted like normal html code would be if
          not in a php file.

          echo <<<HTML
          <form method='POST' action='?act=gallery&showgallery={$_GET
          ['showgallery']}&page=$page'>
          <select size='1' name='pp' onchange='submit()'>
          <option{$select['5']}>5</option>
          <option{$select['10']}>10</option>
          <option{$select['15']}>15</option>
          <option{$select['20']}>20</option>
          <option{$select['25']}>25</option>
          </select>
          </form>
          HTML;


          I've read somewhere that the editor one was using, highlights code
          that is wrapped in <<<HTML...HTML; like html, and if wrapped in
          <<<JS...JS; like java-script and so on...


          --- In editplus@yahoogroups.com, Justin Watt <jwatt@e...> wrote:
          >
          > see: how do i make editplus correctly highlight php heredoc
          strings?
          >
          > http://justinsomnia.org/2004/07/editplus-customizations-faq.html
          >
          > --justin
          >
          >
          > On Wed, 29 Sep 2004, knghtjd wrote:
          >
          > > How can this be done?
          > > I heard that some editors highlight in html highlighting when
          you use:
          > > echo <<<HTML
          > > some html sode...
          > > HTML;
          > >
          > >
          > >
          > >
          > > http://www.editplus.com
          > > http://groups.yahoo.com/group/editplus
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > >
        • knghtjd
          Thanx, but it s not what I was looking for. What I want is that when, for example ,you use the following code, the html code would be highlighted like normal
          Message 4 of 5 , Sep 29, 2004
          • 0 Attachment
            Thanx, but it's not what I was looking for.
            What I want is that when, for example ,you use the following code,
            the html code would be highlighted like normal html code would be if
            not in a php file.

            echo <<<HTML
            <form method='POST' action='?act=gallery&showgallery={$_GET
            ['showgallery']}&page=$page'>
            <select size='1' name='pp' onchange='submit()'>
            <option{$select['5']}>5</option>
            <option{$select['10']}>10</option>
            <option{$select['15']}>15</option>
            <option{$select['20']}>20</option>
            <option{$select['25']}>25</option>
            </select>
            </form>
            HTML;


            I've read somewhere that the editor one was using, highlights code
            that is wrapped in <<<HTML...HTML; like html, and if wrapped in
            <<<JS...JS; like java-script and so on...


            --- In editplus@yahoogroups.com, Justin Watt <jwatt@e...> wrote:
            >
            > see: how do i make editplus correctly highlight php heredoc
            strings?
            >
            > http://justinsomnia.org/2004/07/editplus-customizations-faq.html
            >
            > --justin
            >
            >
            > On Wed, 29 Sep 2004, knghtjd wrote:
            >
            > > How can this be done?
            > > I heard that some editors highlight in html highlighting when
            you use:
            > > echo <<<HTML
            > > some html sode...
            > > HTML;
            > >
            > >
            > >
            > >
            > > http://www.editplus.com
            > > http://groups.yahoo.com/group/editplus
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > >
          • Justin Watt
            hmm, yeah, i don t think editplus can parse html inside php heredoc strings. one option would be to escape out of php, but then you d have to escape back in
            Message 5 of 5 , Sep 29, 2004
            • 0 Attachment
              hmm, yeah, i don't think editplus can parse html inside php
              heredoc strings.

              one option would be to escape out of php, but then you'd have to escape
              back in for all those php variables (in the code below).

              you might also want to write some simple objects to do html select and
              form generation. that way the html only exists in one place and you create
              a php object and populate the select box with the appropriate methods and
              then print a to_html() method.

              --justin


              On Wed, 29 Sep 2004, knghtjd wrote:

              > Thanx, but it's not what I was looking for.
              > What I want is that when, for example ,you use the following code,
              > the html code would be highlighted like normal html code would be if
              > not in a php file.
              >
              > echo <<<HTML
              > <form method='POST' action='?act=gallery&showgallery={$_GET
              > ['showgallery']}&page=$page'>
              > <select size='1' name='pp' onchange='submit()'>
              > <option{$select['5']}>5</option>
              > <option{$select['10']}>10</option>
              > <option{$select['15']}>15</option>
              > <option{$select['20']}>20</option>
              > <option{$select['25']}>25</option>
              > </select>
              > </form>
              > HTML;
              >
              >
              > I've read somewhere that the editor one was using, highlights code
              > that is wrapped in <<<HTML...HTML; like html, and if wrapped in
              > <<<JS...JS; like java-script and so on...
              >
              >
              > --- In editplus@yahoogroups.com, Justin Watt <jwatt@e...> wrote:
              > >
              > > see: how do i make editplus correctly highlight php heredoc
              > strings?
              > >
              > > http://justinsomnia.org/2004/07/editplus-customizations-faq.html
              > >
              > > --justin
              > >
              > >
              > > On Wed, 29 Sep 2004, knghtjd wrote:
              > >
              > > > How can this be done?
              > > > I heard that some editors highlight in html highlighting when
              > you use:
              > > > echo <<<HTML
              > > > some html sode...
              > > > HTML;
              > > >
              > > >
              > > >
              > > >
              > > > http://www.editplus.com
              > > > http://groups.yahoo.com/group/editplus
              > > > Yahoo! Groups Links
              > > >
              > > >
              > > >
              > > >
              > > >
              > > >
              >
              >
              >
              >
              > http://www.editplus.com
              > http://groups.yahoo.com/group/editplus
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.