Page 1 of 1

Expecting , or ;

Posted: Thu Dec 09, 2010 9:28 pm
by CainFool

Code: Select all

<?php if($party==On) { echo "<style type='text/css'> 
		
		@import url( files/style.css )
		
	</style>; }
         else { echo "<style type='text/css'>@import url( files/style.css )</style>; } ?>
I have a website that allows me to make a small adjustment to a file included under.php that allows my site to change the stylesheet.
However with that code above I am getting the classic , or ; expected error, I cant find where it need sit, I took out the ; where file/style.css ); was incase it was corrupting.

But it still does not work so does anybody have a replacement? Thanks.
EDIT: Fixed.

Code: Select all

<?php if($party==On) { echo "<style type='text/css'> 
		
		@import url( files/style_party.css );
		
	</style>"; }
         else { echo "<style type='text/css'>@import url( files/style.css );</style>"; } ?>


Works for me. :)

Re: Expecting , or ;

Posted: Fri Dec 10, 2010 8:10 am
by curlybracket

Code: Select all

if($party==On) // wrong
if($party=="On") // ok