visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: decide what part of html code use - possible?


By: PHP newbee U.S.A.  Date: 26/02/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Is possible to decide on some condition what part of html code will be used, if I don't want to write html code by echo "...."; echo "....";?
Something like:

html_code_common1

<? if(cond==1) do ?>
...
html_code1
...
<? else do ?>
...
html_code2
...
<? fi ?>

html_code_common2
...


???
thank you very much for answer
Michal
By: VGR Date: 26/02/2003 04:24:00 English  Type : Answer
absolutely

<? if ($cond==1) {
?>
htmlcode1
<? } else {
?>
htmlcode2
<? }
htmlcodecommon
?>

Do register to be able to answer

EContact
browser fav
page generated in 333.045010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page