Re: [PHP] Couple of beginner questions



At 1:49 PM +0000 1/11/09, Ashley Sheridan wrote:

Unless it's something like this:

<?php
echo "<h1 class=\"$headerClass\">$whatever</h1>";
?>

Which is unlikely for a header tag, but I know this sort of format gets
used a lot by me and others, especially for setting alternate row styles
on tables (damn browsers and not supporting alternate rows!)

Ash

Ash:

Here's the alterative I would use:

<h1 class="<php echo($headerClass);?>"><php echo($whatever);?></h1>

Again, please forgive my use of echo().

The point being, wherever you want to insert a variable, then do it, but leave html out of your code.

My "alternate row styles" solution is this:

http://webbytedd.com/b/color-rows/

Please note that no html is harmed in the making of this presentation. :-)

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.



Relevant Pages

  • Re: Shell programming question...urgent help please!
    ... The format of the large files is as follows: ... This is the sort of think that one can use awk for (available pre-installed ...
    (comp.unix.programmer)
  • Re: OT? Information processing
    ... Word and HTML). ... I am drafting some documents which end format has not yet been ... Some sort of XML-based system comes to mind, ...
    (comp.dsp)
  • Re: [PHP] Couple of beginner questions
    ... Which is unlikely for a header tag, but I know this sort of format gets ... My "alternate row styles" solution is this: ... Please note that no html is harmed in the making of this presentation. ... you needed to populate from the PHP? ...
    (php.general)
  • Re: email text
    ... I typically use a HEREDOC to format my email messages. ... You can do all sort of things by sending the email as HTML of you want as well. ...
    (perl.beginners)