Link to home
Start Free TrialLog in
Avatar of TLN_CANADA
TLN_CANADAFlag for Afghanistan

asked on

PHP printing CSS error question

Hi everyone,

I know it's not the best practice but we need to print some CSS inside PHP like this

if ( $remind_status == 1 )
	{
		echo "<br><span style="padding:0 0 0 30px;
border-left:#0066cc 12px solid;
background-color:#3FA9F5;
padding:8px;
color:#FFF;
-webkit-border-radius: 0px 6px 6px 0px;
border-radius: 0px 6px 6px 0px;margin-left:30px;">You have an active reminder for every $remind_days days of inactivity!</span>";
	}

Open in new window


but it's giving the following error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/clear555/public_html/jstats.php on line 339 (line that starts with echo)

Could anyone tell us what we're doing wrong here?

Thanks,

D
ASKER CERTIFIED SOLUTION
Avatar of Robert Granlund
Robert Granlund
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points and glad I was able to help.
Avatar of TLN_CANADA

ASKER

Thank you, one other small question with it if I may. The variable $remind_days inside the code is only printing as I guess it thinks its text inside this block. How could I adjust this so it prints the PHP variable here?
You concantonate:
<?php
if ( $remind_status == 1 )
      {
            echo '<br><span style="padding:0 0 0 30px;
border-left:#0066cc 12px solid;
background-color:#3FA9F5;
padding:8px;
color:#FFF;
-webkit-border-radius: 0px 6px 6px 0px;
border-radius: 0px 6px 6px 0px;margin-left:30px;">You have an active reminder for every' . $remind_days.  'days of inactivity!</span>';
      }
?>