Re: Trying to understand what is happening in this code

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

 



Sorry for the top post.




I don't see what's so confusing. It's not magic, it's a simple mechanism where anything not in PHP tags gets echo'd. There're is not conversion of the content outside PHP tags, and thinking there is will likely make it more confusing.




If you're asking because you want to know how it's actually implemented then you can read the source code or ask on the internals list. It appears to me that you're trying to make it more complicated than it really is or needs to be.




-Stuart




-- 

Stuart Dallas

3ft9 Ltd

http://3ft9.com/

—
Sent from Mailbox for iPhone

On Fri, Oct 11, 2013 at 5:15 PM, Nathan Grey <greynng@xxxxxxxxx> wrote:

> Okay, this helps because it is even more mystifying. But actually, I think
> I finally get it. You are like a Zen master, Marc.
> It's probably not technically correct but when I look at this I think that
> PHP turns HTML from a markup language into a scripting language. Okay,
> maybe the way to say it is that PHP is a scripting language that integrates
> seamlessly into HTML. Basically, the combination of PHP/HTML results in a
> scripting language with markup features. Oneness. Wow.
> -----------------------------
> Nathan Grey
> 404-337-9005
> On Fri, Oct 11, 2013 at 11:12 AM, Marc Guay <marc.guay@xxxxxxxxx> wrote:
>> Here's another way to write a loop that might make it more clear
>> what's happening...
>>
>> <ul>
>> <?php foreach ($weekdays as $day) : ?>
>>     <li>
>>         <?php echo $day; ?>
>>     </li>
>> <?php endforeach;?>
>> </ul>
>>
>> --
>> 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