Solved

Define CSS in PHP

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Printing unique/distinct values PHP, MSSQL, Codeigniter 58 94
Time difference 10 36
mysql left join sentence 7 22
php ssh2_scp_send 1 10
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 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

13 Experts available now in Live!

Get 1:1 Help Now