[thelist] PHP - Can write to [head] tag?

Luther, Ron Ron.Luther at COMPAQ.com
Tue Mar 5 17:05:03 CST 2002


Thanks Andrew!

I will give that a shot tomorrow.

Any idea why:

  $row = mysql_fetch_row($result);
   echo("<br><br> alt " . $row[0]);
***** this row returns the correct value from my database field - which
is called "alt" - 'cuz it's the alt tag for the random picture that's
[alledgedly] going to be shown if I can get this bugger working *****

   echo('<br><br> alt with double quote ' . $row["alt"]);
***** this line gives me a blank - nada *****

   echo("<br><br> alt with arrow " . $row->alt);
***** another blank *****

Hmmmm ... basically I guess I'm asking how you reference a field by
'field name' within your PHP.  I can get it by relative reference - but
that's just UGLY.

[I have the WROX book - but I'm just not seeing it.]


Thanks!

RonL.

-----Original Message-----
From: Andrew Forsberg [mailto:andrew at thepander.co.nz]

What sort of trouble? Generating style sheets in the head area should
work:

<?php
print ("<style type='text/css'>\n<!--\n");
print ("//style stuff");
print ("-->\n</style>\n");
?>




More information about the thelist mailing list