Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Define CSS in PHP

Posted on 2006-06-26
1
Medium Priority
?
411 Views
Last Modified: 2012-08-14
Hi Experts,

I've got the following line in a PHP document which is sitting inside a table:

<p><?PHP echo $USER_NAME ?> : </p>

How can I define a style for the  $USER_NAME variable? I've tried the following but it does not work :

<p class="body"><?PHP echo $USER_NAME ?> : </p>

I've also assigned a style to the table but this does not work either.

Your help would be much apprecaited!
0
Comment
Question by:avdvyver
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
rhickmott earned 1000 total points
ID: 16982627
PHP will just echo anything thats non php (enclosed in tags) directly so I would suggest this is a HTML/CSS bug rather than a PHP bug.

Try

<p style="color: #FF0000"><?PHP echo $USER_NAME ?> : </p>

If it appaears in red then I would imagine this is somethig to do with your HTML/CSS.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question