note 29121 added to function.print

From: Date: Mon, 03 Feb 2003 18:07:03 +0000
Subject: note 29121 added to function.print
Groups: php.notes 
Request: Send a blank email to php-notes+get-43340@lists.php.net to get a copy of this message
Using print with variables // var $strCSSName is path to css file $strCSSName = "style.css"; print "<link rel=\"stylesheet\" href=\"$strCSSName\" type=\"text/css\">"; /* will output: <link rel="stylesheet" href="style.css" type="text/css"> Enclose in ' instead of " and you don't have to escape all of them: */ print '<link rel="stylesheet" href="$strCSSName" type="text/css">'; /* will output: <link rel="stylesheet" href="$strCSSName" type="text/css"> to use single quotes and still show the variable, concatenate (can never spell that) it together using . */ print '<link rel="stylesheet" href="'.$strCSSName.'" type="text/css">'; /* will output: <link rel="stylesheet" href="style.css" type="text/css"> -- Todd */ -- http://www.php.net/manual/en/function.print.php http://master.php.net/manage/user-notes.php?action=edit+29121 http://master.php.net/manage/user-notes.php?action=delete+29121 http://master.php.net/manage/user-notes.php?action=reject+29121

« previous php.notes (#43340) next »