P
P
Puma Thailand2012-02-03 16:09:35
PHP
Puma Thailand, 2012-02-03 16:09:35

How does php interpret this ?

It's kind of like a codeigniter
context like this
<?=$htmltitle?>
how can this even work on php 5.1.9

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
Melkij, 2012-02-03
@opium

Like <?php echo $htmltitle; ?>
nl2.php.net/manual/en/ini.core.php#ini.short-open-tag
The feature is very old.

M
Max, 2012-02-03
@7workers

This is how “native” templates look like in… ahem… pure PHP… :)

I tried a lot of things: from the very first versions of smarti to XSLT. PHP templates are my favorite things to do.

V
Vladimir Chernyshev, 2012-02-03
@VolCh

> I would have written a bunch of php coders mixed with html in my template, I would have planted it.
In fact, PHP itself is a templating engine first and foremost. Or for {{var}} you don't kill? Just don't like php? In general, <?= now (in 5.4) will not be disabled at all (before 5.4, you can disable it, why <?= and <? were not recommended for compatibility reasons, <?php echo $var; ?> works everywhere. Now everywhere (>=5.4 ) will work for <?=$var as well; now it's safe to use and you'll see it more often.

A
AFoST, 2012-02-03
@AFoST

<[email protected]`$c`?>

K
knekrasov, 2012-02-04
@knekrasov

There are a lot of skeletons in php syntax.
Here are a couple of examples:
1.

<?php

/* ?> */
echo "test"


won't compile though
<?php

// ?> 
echo "test"


valid
2. Despite the example above, the code
<?php

/* ?> */
echo "test" ?>

Also valid.

6
65520, 2012-02-04
@65520

About this is in the documentation of CodeIgniter itself .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question