Solved

Define CSS in PHP

Posted on 2006-06-26
1
406 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I fix this UPDATE error? 7 32
Logic behind "best rated" calculation 11 31
How to set the Tinymce Editor image path 4 23
Delete  php pages of a part of our site 8 35
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 how to create an extensible mechanism for linked drop downs.
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 dynamically set the form action using jQuery.

821 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