bold I in a variable php

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
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

bold I in a variable php

Post 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...
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: bold I in a variable php

Post 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.
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: bold I in a variable php

Post 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.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: bold I in a variable php

Post 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.
Last edited by McInfo on Thu Jun 17, 2010 4:53 pm, edited 1 time in total.
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: bold I in a variable php

Post 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
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: bold I in a variable php

Post 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.
Post Reply