Page 1 of 1
font, and alignment of print variables in php
Posted: Sun Jun 28, 2009 9:45 pm
by podarum
I need some help, I'm sure someone has done this out there... but, how can I customize the font for each print variable in php..and align all to the same position?
Example :
Code: Select all
print "Email Address is : " . $Email;
print "<br />";
print "Phone used is : " . $Phone;
print "<br />";
What actually shows up is
Email Address is :
blabla@bla.co
Phone used is : 222-222-2222 ,
instead of (in the same horizontal position)
:
blabla@bla.com
:222-222-2222
And how can I make let's say the email address with red font and 12px and phone with blue and 14px.
Thanks
Re: font, and alignment of print variables in php
Posted: Sun Jun 28, 2009 10:28 pm
by requinix
How familiar are you with HTML?
Re: font, and alignment of print variables in php
Posted: Sun Jun 28, 2009 10:33 pm
by podarum
I can do all that in html using CSS, but is there a way I can do it directly in php? What are you thinking?
Re: font, and alignment of print variables in php
Posted: Sun Jun 28, 2009 10:44 pm
by requinix
What you're asking doesn't make sense. PHP doesn't make add colors or effects to text. It merely prints out a bunch of characters: what those characters are and how they're interpreted is what gives color and effects.
What is your target medium? An HTML page or message? A terminal/console?
Re: font, and alignment of print variables in php
Posted: Sun Jun 28, 2009 10:53 pm
by podarum
I have a form that when a customer inputs his credentials it sends him to a confirm page all in php.
For example :
Your email address is :
bla@bla.com
Your Phone is : 222-222-2222
So I need to read these variables from the form.
Re: font, and alignment of print variables in php
Posted: Mon Jun 29, 2009 12:38 am
by requinix
Is your question how to change colors and align the text or how to read from a form?
"Confirmation
page", so you're using HTML? The simplest way to align them is to use a table. Set a style on the <td> to change colors.
To get fields from the form
you should become familiar with this.
Re: font, and alignment of print variables in php
Posted: Mon Jun 29, 2009 8:59 am
by podarum
It's how to align them and resize (color) them after I've POSTed them inot my new php page... I got the POST part fine, it's that each variable (or value) looks the same. I could try the table..