trying to move a div before another div without screwing up php that I do not understand :)
<p>I am a designer/front-end developer but I have to move the div with a class of "span-4" before the div with a class of "span-20." The developer who wrote the php is not available to ask how to not mess up his php markup.</p>

<p>Thank you in advance for any help!</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;THRIVE&lt;/title&gt;
   &lt;?php include("header.php"); ?&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="container"&gt;   
        &lt;div id="thumbnails" class="span-20 last"&gt;
        &lt;?php
            $accessoriesDir = "images/accessories/";
            $collectionCount = 1;
            while(is_dir($accessoriesDir . $collectionCount . "/"))
            {
                $collection_dir = $accessoriesDir . $collectionCount . "/";
                if ($season_dh = opendir($collection_dir)) 
                {   
                    $accsArray = array();
                    $accsCount = 0;
                    while (($accessoryFolder = readdir($season_dh)) !== false)
                    {
                        if(filetype($collection_dir . $accessoryFolder) == "dir" &amp;&amp; strlen($accessoryFolder) &gt; 2)
                            $accsArray[$accsCount++] = $accessoryFolder;
                    }
                    closedir($season_dh);
                    ?&gt;
                    &lt;div id="collection&lt;?php echo $collectionCount?&gt;" class="thumbsHolder &lt;?php if($collectionCount !== 1) echo 'hidden'?&gt;"&gt;

                    &lt;div class="cats span-4"&gt;
                        &lt;?php
                            foreach($accsArray as $index =&gt; $accessory)
                            {
                                $class = "accessory-tab";
                                if($index == 0)
                                {
                                    $class .= " selected";
                                }
                                echo "&lt;a id='".strtolower($accessory)."-tab' class='".$class."'&gt;".$accessory."&lt;/a&gt;&lt;br/&gt;";
                            }
                        ?&gt;
                    &lt;/div&gt;
                    &lt;?php
                    foreach($accsArray as $index =&gt; $accessory)
                    {
                        ?&gt;
                        &lt;div id="&lt;?php echo strtolower($accessory);?&gt;-view" class="view &lt;?php if($index != 0) echo 'hidden';?&gt;"&gt;
                        &lt;?php
                        $imageCount = 0;
                        $accessoryDir = $collection_dir.$accessory."/";
                        $dh = opendir($accessoryDir);
                        while (($file = readdir($dh)) !== false &amp;&amp; $imageCount &lt; 8) 
                        {
                            if(filetype($accessoryDir . $file) == "file" &amp;&amp; substr($file, -4) == ".jpg")
                            {
                            ?&gt;
                                &lt;div class="thumbnailExpander &lt;?php if($imageCount % 2 !== 0)echo 'expandLeft';?&gt; &lt;?php if($imageCount &gt;= 4)echo 'bottom';?&gt;" 
                                    style="left:&lt;?php echo ($imageCount % 4) * (317-132) ?&gt;px;top:&lt;?php echo 110+((132+53)*intval($imageCount/4));?&gt;px;"&gt;
                                    &lt;!--div class="thumbAnchor"--&gt;
                                        &lt;img src="&lt;?php echo $accessoryDir . $file ?&gt;" style=""/&gt;
                                    &lt;!--/div--&gt;
                                &lt;/div&gt;
                            &lt;?php
                                $imageCount++;
                            }
                        }
                        ?&gt;
                        &lt;/div&gt;&lt;!-- #accessory-view --&gt;
                        &lt;?php
                        closedir($dh);
                    }
                    ?&gt;
                    &lt;/div&gt;&lt;!-- .thumbsHolder --&gt;
                    &lt;?php
                }
                $collectionCount++;
            }
        ?&gt;
        &lt;/div&gt;&lt;!-- #thumbnails --&gt;

        &lt;?php include("nav.php"); ?&gt;
        &lt;div id="debug" style="color:white"&gt;&lt;/div&gt;
      &lt;/div&gt;
   &lt;/body&gt;
&lt;/html&gt;
</code></pre>
