Re: Trying to understand what is happening in this code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 Oct 2013, at 16:20, Nathan Grey <greynng@xxxxxxxxx> wrote:

> Stuart, Jose - Thanks for your quick response. Are you saying that the processor echos all the html tags it sees. Is it doing something like this to the script:
> 
> echo <body>
> echo <h1>The first twenty Fibonacci numbers:</h1>
> echo <ul>
>      <?php
>        $first = 0;
>        $second = 1;
>        for ($i = 0; $i < 20; $i++) {
>         ?>
> echo  <li><?php echo $first + $second ?></li>
>       <?php
>         $temp = $first + $second;        
>         $first = $second;
>         $second = $temp;
> 
>       } ?>
> echo  </ul>
> echo  </body>
> 
> Or is it just the line in question that is being echoed?

I'm not sure exactly what it gets compiled to, but I also don't see why it matters. All that matters is that content outside of PHP tags will simply get echo'd.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux