" showed 2 times "> " showed 2 times " />
We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30086
    • 110 Posts
    I created a snippet for changing the language in modx. And i noticed that this symbol "?>" is being displayed twice and if I delete it and saved it, and open it again, it will come back any idea why is this happening?

    Here is the code:
    <?php
    if($parentId == 1) // ENGLISH
    {
        switch($name)
        {
            case "News": 
                return "News"; break;
            case "Events":
                return "Events"; break;
            case "Articles"
                return "Articles"; break;
            case "Success Stories":
                return "Success Stories"; break;
        }    
    }
    
    
    if($parentId == 11) // GERMAN
    {
        switch($name)
        {
            case "News": 
                return "News"; break;
            case "Events":
                return "Events"; break;
            case "Articles"
                return "Artikel"; break;
            //case "Success Stories":
                //return "Success Stories"; break;
        }    
    }
    
    
    if($parentId == 6) // FRENCH
    {
        switch($name)
        {
            case "News": 
                return "Neuigkeiten"; break;
            case "Events":
                return "Events"; break;
            case "Articles"
                return "Artikel"; break;
            //case "Success Stories":
                //return "Success Stories"; break;
        }    
    }
    ?>
    ?>
      • 1061
      • 81 Posts
      I don’t have at all closed symbols ’?>’ after upgrade 2.0.0-pl -> 2.0.2-pl.
      But snippet’s still worked.


      I use MirrorCode.
        • 30086
        • 110 Posts
        what is mirror code?