with the following code
<?php
if (qtrans_getLanguage() == "en") {
echo <?php include( TEMPLATEPATH . '/slider_en.php' ); ?>;
}else{
echo <?php include( TEMPLATEPATH . '/slider_de.php' ); ?>;
}
?>
i’m trying to include a file, based on the chosen language of the website. guess my idea is right but i’m totaly wrong on the syntax of using include in an echo..
can someone please oint me in the right direction?
many thanks,
tobi.
You are already in PHP mode, so you don’t need to re-open the PHP tags (
<?php). Remove them, and it should work. You don’t even need theecho, since PHP drops out of PHP mode and back in HTML mode when it includes a file.