Quick PHP <Head> question

Discussion in 'PHP' started by misohoni, Aug 26, 2004.

  1. #1
    This META code works, but wondering how I can implement a Stylesheet inside it. My stylesheet reference would be:

    <style type="text/css" media="all">@import "../style.css";</style>

    The code currently is:

    <?php
      function MetaSimple()
      {
        return Meta("Shop - Buy Books Online : Feng Shui Chinese",
                    "Buy Chinese Feng Shui Books online.");  
      }
      
      function Meta($Title, $Description)
      {
        $Result  = "<HEAD>\n";
        $Result .= "<TITLE>$Title</TITLE>\n";
        $Result .= "<META name=\"description\" content=\"$Description\">\n";
    
    //    $Result .= "<META http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">";
        $Result .= "</HEAD>\n";
        return $Result;    
      }
      
      function DocType()
      {
        return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
      }
    
    ?>
    PHP:

     
    misohoni, Aug 26, 2004 IP
  2. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    function Meta($Title, $Description)
      {
        $Result  = "<HEAD>\n";
        $Result .= "<TITLE>$Title</TITLE>\n";
        $Result .= "<META name=\"description\" content=\"$Description\">\n";
        $Result .= "<style type=\"text/css\" media=\"all\">@import \"../style.css\";</style>\n";
    
    //    $Result .= "<META http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">";
        $Result .= "</HEAD>\n";
        return $Result;    
      }
    PHP:


    Does that not work?
     
    xml, Aug 26, 2004 IP