Re: [SMARTY] including a browser sniffer's output into my templates

From: Date: Thu, 29 Jul 2004 10:43:27 +0000
Subject: Re: [SMARTY] including a browser sniffer's output into my templates
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11641@lists.php.net to get a copy of this message
See the PHP Manual for the difference between single and double quotes. A single quoted string like you're assigning doesnt expand variables, so its assigning '$foobar' literally. You need to either use double quotes "$foobar" or better yet, if you're assigning a variable, dont use quotes as all. $smarty->assign('css', $foobar); See: http://php.net/manual/en/language.types.string.php -bok On Thu, 29 Jul 2004 12:35:01 +0200, Thorsten <shockie@gmx.net> wrote: > hi Robert, > > > Have you considered using a link element to include the css for you? > > like <link type="text/css" rel="stylesheet" > > href="/path/to/specific/stylesheet.css" /> > yes, that's exactly what is supposed to be inserted, i just can't figure > out how to use the php-driven sniffer's output and put it into my templates. > > <link type="text/css" rel="stylesheet" href="{$css}" /> is > what i had so > far. having the {$css} variable hard-coded into my php file is no > problem at all, but as soon as i've got to catch some output of the > sniffer (or any other code, for that matter), using > smarty->assign('css','$foobar'); prints $foobar into my xhtml output. > > if fetch() is the solution, would somebody please post an example? > > > > - Thorsten > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.smarty.general (#11641) next »