Underlining $_POST results

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rxroids
Forum Newbie
Posts: 5
Joined: Fri Apr 06, 2007 10:29 pm

Underlining $_POST results

Post by rxroids »

I'm curious if I can have my final result underlined or italicized.

Code: Select all

<?php echo $_POST['title']; ?>
Can someone give me the code to accomplish this?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

I don't know what is the context where you use this code, but I guess this is what you want (italic):

Code: Select all

<?php echo '<i>' . $_POST['title'] . '</i>'; ?>
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

I would use a css class:

Code: Select all

<?php echo '<span class=\"post_result\">' . $_POST['title'] . '</div>'; ?>
With

Code: Select all

.post_result {

font-....

                    }
In your stylesheet

Makes it easier to maintain your website style
rxroids
Forum Newbie
Posts: 5
Joined: Fri Apr 06, 2007 10:29 pm

Post by rxroids »

Thanx guys. I went ahead and used the first one only because if you highlight copy n paste the style stays but with CSS aparently not. A lot of help though, thanx.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

I hope you didn't actually use

Code: Select all

.post_result {

font-....

                    }
as the style :D

have a look at http://www.w3.org/Style/Examples/011/firstcss if you're not familiar with css
Post Reply