Change Stylesheet via If in php
        Posted  
        
            by mikep
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mikep
        
        
        
        Published on 2010-04-27T13:46:49Z
        Indexed on 
            2010/04/27
            13:53 UTC
        
        
        Read the original article
        Hit count: 546
        
Hey i have a question. At the moment i'm trying to use a stylesheet which i get through a if. but it doesn't do anything.
here is my code at the moment. the variable $stylesheet will be variable but while testing i've setted it to normal
    <?php
    $stylesheet =  'normal'
if($stylesheet = 'small')
{
    $style = './sitestyle/stylesheetsmall.css';
}
if($stylesheet = 'big')
{
    $style = './sitestyle/stylesheetbig.css';
}
    else
    {
            $style = './sitestyle/stylesheet.css';
    }
    echo '<link rel="stylesheet" type="text/css" href="$style">';
    ?>
Thanks for your answers.
© Stack Overflow or respective owner