if statement just about works - but getting partial error

just about there with this if statement but getting an error:

<?php if ($_GET['Itemid']=="53")
 { echo
"<div id=\"subTitleBar\">
<div id=\"yellowArrow\" style=\"margin-top:5px;\">
   
      
                          <div class=\"moduletableArrowPad\">
                              <img src=\"templates/levy1/images/yellow_arrow.gif\" alt=\"Levy Angstreich Finney Baldante Rubenstein and Coren, P.C., Attorneys \" title=\"Levy Angstreich Finney Baldante Rubenstein and Coren, P.C., Attorneys \" />                        </div>

      
        
  </div> <div class=\"componentheading\" style=\"color:#910027;\">ASSOCIATES</div></div>
do {
<div id=\"associateContainer\"> ".$row_rsAssociates['introtext']."<br>
 ".$row_rsAssociates['title']."<br>
  <a href=\"index.php?view=article&id=".$row_rsAssociates['id'].":".$row_rsAssociates['alias']."&Itemid=53&option=com_content\" class=\"contentpagetitle$this->params->get( 'pageclass_sfx' )\">Profile</a></div>
 } while ($row_rsAssociates = mysql_fetch_assoc($rsAssociates))";}?>
phillystyle123Asked:
Who is Participating?
 
nizsmoConnect With a Mentor DeveloperCommented:
What exactly is the error? No syntax errors in there, however 1 weird thing about your code is that you have your do-while statemtn within your echo, is this done on purpose?

Correct code should be below which fits a do-while loop in the if statement, and should output everything correctly.


<?php

if ($_GET['Itemid']=="53")
 {
       echo
            "<div id=\"subTitleBar\">
            <div id=\"yellowArrow\" style=\"margin-top:5px;\">
                          <div class=\"moduletableArrowPad\">
                              <img src=\"templates/levy1/images/yellow_arrow.gif\" alt=\"Levy Angstreich Finney Baldante Rubenstein and Coren, P.C., Attorneys \" title=\"Levy Angstreich Finney Baldante Rubenstein and Coren, P.C., Attorneys \" />  </div>
              </div> <div class=\"componentheading\" style=\"color:#910027;\">ASSOCIATES</div></div>";
            do {
                  echo "
            <div id=\"associateContainer\"> ".$row_rsAssociates['introtext']."<br>
             ".$row_rsAssociates['title']."<br>
              <a href=\"index.php?view=article&id=".$row_rsAssociates['id'].":".$row_rsAssociates['alias']."&Itemid=53&option=com_content\" class=\"contentpagetitle$this->params->get( 'pageclass_sfx' )\">Profile</a></div>";
             } while ($row_rsAssociates = mysql_fetch_assoc($rsAssociates));
 }

?>

Let me know how you go.
0
 
phillystyle123Author Commented:
perfecto - that's exactly what was wrong - thanks for the help!
0
 
nizsmoDeveloperCommented:
Glad to be of assistance.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.