Reply to Re: Question on using HTML within PHP documents

Your name:

Reply:


Posted by Areric on 12/17/28 11:50

by default php will output your html as normal if you close the tags.
So instead of define('TEXT_INFORMATION', '
with all yoru code just close the tag
?>
and write it like normal HTML. If its not inside the tags its not
parsed.

Also if you have dynamic content you want to include a quick was is
this

<div>This is <?= $name ?>'s DIV tag, isnt it cool </div>

<?= ?> works as a quick echo of whatever follows the =


Tristán White wrote:
> As some of you who helped with my "No input file selected" query earlier
> already know, I've just started a new job and am new to PHP.
>
> All the webpages are PHP, but contain HTML as a string definition. Which is
> actually nice and easy for me as I am an HTML specialist, but am a complete
> newbie with PHP.
>
> How inadvisable is it though?
>
> Here's what I mean:
>
> <?php
>
> define('NAVBAR_TITLE', 'Shipping');
>
> define('HEADING_TITLE', 'Shipping');
>
> define('TEXT_INFORMATION', '
>
>
> <table width="90%" border="0" cellpadding="5" height="339">
> <tr>
> <td
> width="20%">&nbsp;</td>
> <td width="51%">
> <p><font
> size="7" face="Verdana, Arial, Helvetica, sans-serif"><b>Don\t know if this
> is a good idea</b></font> ..........etc
> .......
>
> Basically - any HTML can go here, as long as it\'s within a table, and
> apostrophes are preceded by a backslash - as I have done above with the word
> &quot;it\'s&quot;
>
>
> </table>
>
> ');
> ?>
>
>
> Basically, it's just HTML that is copied and pasted into a
> define('TEXT_INFORMATION', ' string '
>
> Which is why it ends
> ');
> ?>
>
>
> What are the perils that could face me by continuing to write pages in this
> fashion? Could it cause accessibility problems on some browsers?
>
> I know it's terribly lazy but I have an awful lot of work to do and not
> enough time just yet to learn good PHP skills.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация