Re: php string syntax question with html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$var = 'bla'.$var2.'doh'.$var3['index'].'argh'.$var4[$var4index];

is so much more readable in any editor that does syntax highlighting,
and parses quicker too.

On Thu, Mar 11, 2010 at 1:15 AM, David Mehler <dave.mehler@xxxxxxxxx> wrote:
> Hello,
> I've got what is probably a very simple question, probably something
> having to do with quotes single vs. double, but the answer is
> frustrating elusive, I keep getting a syntax error.
> I'm trying to customize a wordpress theme a friend sent me. We're both
> using apache as web server and php5, but his has got to be configed
> differently than mine. The theme deals with multiple stylesheet
> inclusion among other things. The original line is:
>
> $styleSheets[0]["sheet"]='<link
> href="/wp-content/themes/theme/style/white.css" rel="stylesheet"
> type="text/css" />';
>
> That code puts the <link in the head portion of the document. The
> issue is his / is not where mine is, i'm using a virtual host and need
> a line similar to this:
>
> $styleSheets[0]["sheet"]='<link href=$_SERVER['DOCUMENT_ROOT'] .
> "/wp-content/themes/theme/style/white.css" rel="stylesheet"
> type="text/css" />';
>
> I've tried this with both double quotes before the <link declaration,
> but keep getting a parse error.
> Help appreciated.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux