Hi folks,
I've been working with a developer on a web-based application. I have some experience with html and css mainly, and now that the heavy lifting is done, I'm wanting to start improving the design elements of the program (I know that is NOT the ideal situation, and in a perfect world, all design elements would have been considered from the beginning-but those of you that work on projects know that it doesn't always go that way :-D )
I'm curious if there is a "standard" way that css and general layout structure is handled when working with extensive PHP conditionals. Here is an example of one area of our page:
$print_data .= '<p><b>My subscription:</b> ';
if($period3=="1 M") {
$print_data .= "$".$amount3." a month.<br />";
$print_data .= "<b>Billing date:</b> Monthly on the " . date("jS", $subscr_effective_date_string) .".<br /><br /><b>Modification Options:</b><br />";
$print_data .= '<input type="button" value="$75 every 6 months" onclick="#" /><br />
<input type="button" value="$135 every 12 months" onclick="#" /><br /><br />';
}
elseif($period3=="6 M") {
$print_data .= "$".$amount3." every 6 months.<br />";
$print_data .= "<b>Billing date:</b> Every 6 months on " . date("m/d", $subscr_effective_date_string) ." and " . date("m/d",$subscr_effective_date_add_6mo_string) .".<br /><br /><b>Modification Options:</b><br />";
$print_data .= '<input type="button" value="$14 a month" onclick="#" /><br /><input type="button" value="$135 every 12 months" onclick="#" /><br /><br />';
}
elseif($period3=="1 Y") {
$print_data .= "$".$amount3." every year.<br />";
$print_data .= "<b>Billing date:</b> Yearly on the " . date("m/d", $subscr_effective_date_string) .".<br /><br /><b>Modification Options:</b>";
$print_data .= '<input type="button" value="$14 a month" onclick="#" /><br /><input type="button" value="$75 every 6 months" onclick="#" /><br /><br />';
}
$print_data .= '<input type="button" value="Unsubscribe" onclick="#" /></p>';
So in short, I'm wanting to contain the above in a <ul>
and then have each conditional be a separate <li>
group that will populate the <ul>
depending on the condition.
Is this sort of thing just usually all handled in-line, or what?
Thanks! Joel