Re: Trying to understand what is happening in this code
| From: | Stuart Dallas | Date: | Fri, 11 Oct 2013 17:18:26 +0000 |
| Subject: | Re: Trying to understand what is happening in this code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322282@lists.php.net to get a copy of this message | ||
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@gmail.com> 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@gmail.com> 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
>>
>>