raulmonda
asked on
php html and css, how to use in the same file
Hi experts,
Im new in php and css and im working on a small project. Im stuck on a coding issue. Here is the scenario: i have two different table layouts defined in css code. Depend on a php variable value one or other css format should be used. here is the code ive made but it gives me error.
Any idea how i can do the css selection according to php variable $var value?
Thank you in advance.
Regards,
Raul
Im new in php and css and im working on a small project. Im stuck on a coding issue. Here is the scenario: i have two different table layouts defined in css code. Depend on a php variable value one or other css format should be used. here is the code ive made but it gives me error.
<?php
if ($var==0)
{
<table border="1" cellpadding="1" cellspacing="1" style="height: auto; width: 860px;">
}
if ($var!=0)
{
<table border="1" cellpadding="1" cellspacing="1" style="height: auto; width: auto;"> <!--At this line i got the parsing error-->
}
?>
<tr>
<td>
....................
.....................
.....................
</tr>
</td>
</table>
Any idea how i can do the css selection according to php variable $var value?
Thank you in advance.
Regards,
Raul
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I test it and it works fine.
Thank you very much.
Regards,
Raul