snippets of php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Ross

    snippets of php

    I have a fairly large .php page that is 99% html with two teeny tiny
    snippets of PHP: one near the beginnning of the page, the other near the
    end. Is there an easy way to get the second script to execute first? Both
    scripts echo small bits of html, so they have to stay where they are within
    the context of the page.

    Thoughts?
    --
    Alexander Ross
    alexross@bleen. net


  • Marcus

    #2
    Re: snippets of php

    Alexander Ross wrote:[color=blue]
    > I have a fairly large .php page that is 99% html with two teeny tiny
    > snippets of PHP: one near the beginnning of the page, the other near the
    > end. Is there an easy way to get the second script to execute first? Both
    > scripts echo small bits of html, so they have to stay where they are within
    > the context of the page.[/color]



    Alexander,

    You could put the second script before the first script so that it
    executes first... then to get the HTML, store the actual string of HTML
    code in a variable, and echo it at the bottom of the page where it is
    displaying right now. Hope that works.

    Marcus

    Comment

    • SwissCheese

      #3
      Re: snippets of php

      "Alexander Ross" <alexross@bleen .net> wrote in message
      news:7bdVa.380$ Vt6.86@rwcrnsc5 2.ops.asp.att.n et...[color=blue]
      > I have a fairly large .php page that is 99% html with two teeny tiny
      > snippets of PHP: one near the beginnning of the page, the other near the
      > end. Is there an easy way to get the second script to execute first? Both
      > scripts echo small bits of html, so they have to stay where they are[/color]
      within[color=blue]
      > the context of the page.
      >[/color]

      If they have to stay where they are then why do you need to execute the
      second script before the first one?

      SwissCheese


      Comment

      • Alexander Ross

        #4
        Re: snippets of php

        The first script displays some text (a page heading) based on criteria x,y
        and z. The problem is that in some instances, the second script can change
        the value of 'z' hence changing wha the page heading should read. Make
        sense?

        Alex


        "SwissChees e" <SwissCheese@cf l.rr.com> wrote in message
        news:St%Wa.7377 $On2.545063@twi ster.tampabay.r r.com...[color=blue]
        > "Alexander Ross" <alexross@bleen .net> wrote in message
        > news:7bdVa.380$ Vt6.86@rwcrnsc5 2.ops.asp.att.n et...[color=green]
        > > I have a fairly large .php page that is 99% html with two teeny tiny
        > > snippets of PHP: one near the beginnning of the page, the other near the
        > > end. Is there an easy way to get the second script to execute first?[/color][/color]
        Both[color=blue][color=green]
        > > scripts echo small bits of html, so they have to stay where they are[/color]
        > within[color=green]
        > > the context of the page.
        > >[/color]
        >
        > If they have to stay where they are then why do you need to execute the
        > second script before the first one?
        >
        > SwissCheese
        >
        >[/color]


        Comment

        Working...