output from a for loop into one variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sigurdur Einarsson

    output from a for loop into one variable

    I know the answer to my question may be quite obvoius, one of those days
    I guess.
    The kind of day that me and me head is not running on all cylinders.

    The question:
    How do you take an output from a for loop and place it in variable to echo.

    regards
    Siggi
  • Alvaro G Vicario

    #2
    Re: output from a for loop into one variable

    *** Sigurdur Einarsson wrote/escribió (Wed, 31 Mar 2004 16:18:55 +0000):[color=blue]
    > How do you take an output from a for loop and place it in variable to echo.[/color]

    The for loops do not return any value. They just execute lines of code.

    --
    --
    -- Álvaro G. Vicario - Burgos, Spain
    --

    Comment

    • IndyTim

      #3
      Re: output from a for loop into one variable

      Sigurdur Einarsson wrote:[color=blue]
      > I know the answer to my question may be quite obvoius, one of those days
      > I guess.
      > The kind of day that me and me head is not running on all cylinders.
      >
      > The question:
      > How do you take an output from a for loop and place it in variable to echo.
      >
      > regards
      > Siggi[/color]
      Simple example:

      for($i=0; $i<4; $i++)
      {
      echo '<br>i='.$i;
      }


      IndyTim

      Comment

      Working...