print function problems

A

Anonymous

Guest
hi,

i am trying to embed php code in html but am having some problems. the following is the code i'm using.

<?php if (mosCountModules('frontimage')==1 ){

print "<div id=\"frontimage\">" .
mosLoadModules('frontimage', -2 ) ;
. "</div>" .
. "<div id=\"lead_back\">" .
[some unrelated code here]
. "</div>" .
"<div id=\"lead_story\">" .
mosLoadModules ('right', -2 ); .
"</div></div>";
}


if I concatenate using . the results of the functions do not appear between the divs in the html:

can someone explain to me why this is happening? the results of the functions (just some additional html) does appear on the page but not between the divs.

thanks,

lukemack.
 
Code:
print "<div id=\"frontimage\">" .
mosLoadModules('frontimage', -2 ) ;
. "</div>" .

Try removing that semi colon
 
Back
Top