html in php question
Posted: Tue May 30, 2006 10:24 am
Hello all,
I've been trying to figure out if it's possible at all to put html in the middle of php without breaking the php or using echo or print. Hear me out... this is the situation:
I'm just making an admin section for a web site. I used to work in cold fusion, but we want to move over to php for server reasons. Here is pseudocode of what I used to do in cold fusion.
So pretty much it's several if statements deep depending on what mode they've chosen, what action they've chosen, and whether or not they submitted a form or whatnot. Often times in the deepest levels of the nest there is a lot of html code... and it's just plain ugly to try to put all that in echos or prints. Cold Fusion worked as a tag language where even the ifs and else ifs were tags that didn't require continuity... didn't have to be together in one <?php ... ?> tag.
I'm looking for any possible way other than having a different include file for every single section to have html look nice in large amounts of code... I'm guessing there's nothing I can do and I have to live with horrible looking huge chunks of html in string quotes that don't color code in dreamweaver or millions of different include files. If I'm wrong though, I would be pleasantly suprised and appreciative.
I've been trying to figure out if it's possible at all to put html in the middle of php without breaking the php or using echo or print. Hear me out... this is the situation:
I'm just making an admin section for a web site. I used to work in cold fusion, but we want to move over to php for server reasons. Here is pseudocode of what I used to do in cold fusion.
Code: Select all
if url.mode = section
{
if url.action = add
{
if formwassubmitted
{
handle form here
}
else
{
show form here
}
}
else if url.action = edit
{
etc etc etc
}
}I'm looking for any possible way other than having a different include file for every single section to have html look nice in large amounts of code... I'm guessing there's nothing I can do and I have to live with horrible looking huge chunks of html in string quotes that don't color code in dreamweaver or millions of different include files. If I'm wrong though, I would be pleasantly suprised and appreciative.