Re: [PHP] Re: PHP in HTML code

[email protected] (Jochem Maas)
Newsgroups php.general
Message-ID <[email protected]>
Op 3/13/10 3:49 PM, Jorge Gomes schreef:
> First of all, i recommend the use of normal php tags (<?php ...  ?>) because
> the short tags are atm marked as* **DEPRECATED*.

that's a documentation error.

> 
> You should also echo your values to the page, instead using the shortcut <?=
> (stop being a lazy ass! :P):

it's not lazy, it's succinct and much easier to read (once you know what it means),
but ... if you require portable code and your liable to be running on shared
hosting where you don't control the ini settings you might consider not using it.

it is often feasable to turn them on explicitly in your 'init' routine so that
your template/output code can use short tags:

<?php ini_set('short_open_tag', true); ?>

I can't recall that this is ever locked down on a server so that you can't
change it, although the default if quite often set to FALSE.

> <tr>
> <td align="left"><?php echo $_SESSION['scripture_text']; ?></td>
> </tr>
> 
> --------
> 
> <input type="text" name="reservation_date" value="<?php echo
> $_GET['rdate'];  ?>" readonly="">
> 
> remember that between tags, we have normal php code.
> 
> Rewards

how much?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.