[SOLVED] Syntax Question

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

Post Reply
dardsemail
Forum Contributor
Posts: 136
Joined: Thu Jun 03, 2004 9:02 pm

Syntax Question

Post by dardsemail »

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!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

technically those look fine to me..
dardsemail
Forum Contributor
Posts: 136
Joined: Thu Jun 03, 2004 9:02 pm

Post by dardsemail »

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 »

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..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

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 »

Boy o boy - didn't realize it was that simple!!! Brilliant! Thanks!
Post Reply