Solved

Define CSS in PHP

Posted on 2006-06-26
1
404 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
1 Comment
 
LVL 13

Accepted Solution

by:
rhickmott earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now