Class inside Echo : Managed to get this code working (I'm not into php).

Is there anyway this can be simplified ? Many thanks !

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <?php
    $menu = JSite::getMenu(); 
    $arr = (array)$menu->getActive(); 
    $alias = $arr['alias'];

    if ($alias == "accueil") {echo('<h2 class="moduletitle"><span>title 1</h2></span>');}
    else if ($alias == "welcome") {echo('<h2 class="moduletitle"><span>title 2</h2></span>');}

    else {
    	echo "<h1 class='moduletitle'><span>";
    	echo $this->escape($this->params->get('page_title'));
    echo "</span></h1>"; }
    ?>

<!-- end snippet -->

