Html/Php block??
Permalink
Hello, I installed the two free PHP blocks, but it seems they do not support html. I'm not a developer; but trying to make a little table that pulls data dynamically from a database depends on server date and displays it (styled).
Does anyone know or has anyone combined html/php in a block? Can you help guide me please.
Does anyone know or has anyone combined html/php in a block? Can you help guide me please.
Hmm thanks.. It's giving me a bunch of syntax errors.. I have a lot more learning to do.. but basically you know for sure you can switch to and from? What if I need to style data that php pulls for me, this is possible?
I'm going the let the php/CSS/c5 guru's answer to the styling questing for the best way (i'm a server guy).
As far as your syntax errors, just to get the hang of it, start out with something simple like:
$h1 = "This is an H1";?>
This is default text<br /><h1>
<?php echo $h1; ?>
</h1><h2>GOOD LUCK!!!<h2><p> You will get the hang of it :)</p>
You may need this on the end, i forget
<?php
As far as your syntax errors, just to get the hang of it, start out with something simple like:
$h1 = "This is an H1";?>
This is default text<br /><h1>
<?php echo $h1; ?>
</h1><h2>GOOD LUCK!!!<h2><p> You will get the hang of it :)</p>
You may need this on the end, i forget
<?php
<?php echo $variable; ?> <h1>HTML Stuff </h1><?php echo $anothervar; ?>
I kind of remember that the block automatically starts in php mode, so if the first thing is HTML, start out with
?> <h1>HTML Stuff...</h1>
I forget the nittygritty, but it's easy enough to play with and figure out :)