Language dependant sidebars vice-versa Due to lack of php knowledge i cant find where i am mistaken and how it`s better to do this. I have several languages one of them LTR and the other RTL and i need sidebars to be displayed vice-versa. It means that in LTR menu would be in the first and in the RTL it would be in the second sidebar. The code returns '1' somehow and breaks the markup.
Please help me to modify this code:

global $language;
switch ($language-&gt;language) {
case "en":
if ($page["sidebar_first"]):
print "&lt;aside id='sidebar-first' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_first'])."&lt;/aside&gt;"; 
endif;
if ($page["sidebar_second"]):
print "&lt;aside id='sidebar-second' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_second'])."&lt;/aside&gt;"; 
endif;      
break;
case "ar":
if ($page["sidebar_second"]):
print "&lt;aside id='sidebar-first' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_second'])."&lt;/aside&gt;"; 
endif;  
if ($page["sidebar_first"]):
print "&lt;aside id='sidebar-second' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_first'])."&lt;/aside&gt;"; 
endif;
break;
}
You missed the position of the string operator . You can try the code mentioned below.

    global $language;
    switch ($language-&gt;language) {
    case "en":
    if ($page["sidebar_first"]):
    print "&lt;aside id='sidebar-first' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_first'])."&lt;/aside&gt;"; 
    endif;
    if ($page["sidebar_second"]):
    print "&lt;aside id='sidebar-second' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_second'])."&lt;/aside&gt;"; 
    endif;      
    break;
    case "ar":
    if ($page["sidebar_second"]):
    print "&lt;aside id='sidebar-first' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_second'])."&lt;/aside&gt;"; 
    endif;  
    if ($page["sidebar_first"]):
    print "&lt;aside id='sidebar-second' role='complementary' class='sidebar clearfix'&gt;".print render($page['sidebar_first'])."&lt;/aside&gt;"; 
    endif;
    break;
    }