Page 1 of 1

bold I in a variable php

Posted: Thu Jan 21, 2010 11:59 am
by Goofan
Hi again, gots lots of problems today... :lol:

My next problem is:
I got a variable with the word Italiano in it and if I echo it it will say that...
What I now want is to make the I in Italiano to be bold like Italiano

I need to pinpoint the I and make it Bold.

Code: Select all

 
$variable="Italiano";
echo $variable;
 
-Thanks in advance
-Thomas

Also I would like to get so i can pinpoint the first letter and make it bold...

Re: bold I in a variable php

Posted: Thu Jan 21, 2010 12:16 pm
by requinix
If you want to program in PHP then you need to learn HTML.

How do I make something bold in HTML?

If you need to do something more complex then ask a better question. If you don't know how to do that, this can help.

Re: bold I in a variable php

Posted: Thu Jan 21, 2010 12:18 pm
by Goofan
I dont know if you understood me. so ill explain abit further.

I need to change the I within the variable so that when its echoed it will allready have a bold I. hope that makes it abit clearer.
I know alot about html and I also know small scatterd chunks of php.

Re: bold I in a variable php

Posted: Thu Jan 21, 2010 12:57 pm
by McInfo
Do you want the "I" bolded because it is the first letter or because it is a capital I?

Edit: This post was recovered from search engine cache.

Re: bold I in a variable php

Posted: Thu Jan 21, 2010 2:28 pm
by Goofan
Becouse its the first letter but is it possible to bold all "non-capital i" and "capital I" in the variable so if its a sentence all "i and I" will be bold :D

-Thanks in advance
-Thomas

Re: bold I in a variable php

Posted: Thu Jan 21, 2010 2:53 pm
by McInfo

Code: Select all

substr('string', 0, 1); // "s"
substr('string', 1); // "tring"

Code: Select all

<b>Bold text in HTML</b>
Edit: This post was recovered from search engine cache.