PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
dardsemail
Forum Contributor
Posts: 136 Joined: Thu Jun 03, 2004 9:02 pm
Post
by dardsemail » Wed Aug 25, 2004 2:28 pm
I have some php code to create tables and I'm wondering about the syntax to use in PHP to create the following HTML code:
Code: Select all
<table width="75%" style="height:400px " align="center" border="0" cellspacing="0" cellpadding="0">
I seem to be getting messed up with the % and px values.
Thanks!
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Aug 25, 2004 2:31 pm
technically those look fine to me..
dardsemail
Forum Contributor
Posts: 136 Joined: Thu Jun 03, 2004 9:02 pm
Post
by dardsemail » Wed Aug 25, 2004 2:56 pm
They are fine in the HTML mode, but when embedded in PHP I need to use periods and commas and can't seem to get them to work properly.
For example, I know that within PHP the align="center" would be align = ",center,", but I don't know how to do the numeric values including the % and px.
Draco_03
Forum Regular
Posts: 577 Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada
Post
by Draco_03 » Wed Aug 25, 2004 2:58 pm
I don t understand your question.. But if it's how to write the html line in php
Code: Select all
echo("
<table width="75%" style="height:400px " align="center" border="0" cellspacing="0" cellpadding="0">
");
That would be it..
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Aug 25, 2004 3:03 pm
or just:
Code: Select all
echo '<table width="75%" style="height:400px " align="center" border="0" cellspacing="0" cellpadding="0">';
dardsemail
Forum Contributor
Posts: 136 Joined: Thu Jun 03, 2004 9:02 pm
Post
by dardsemail » Wed Aug 25, 2004 7:58 pm
Boy o boy - didn't realize it was that simple!!! Brilliant! Thanks!