Activity Stream
48,167 MEMBERS
61043 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Member

    Default Uppercase Words

    Hello i need a PHP code to make certain words like: hd, pdf, dvd, etc... to appear like: HD, PDF, DVD.
    Green Arrow Reviewed by Green Arrow on . Uppercase Words Hello i need a PHP code to make certain words like: hd, pdf, dvd, etc... to appear like: HD, PDF, DVD. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    Use http://php.net/manual/en/function.strtoupper.php

    you can make an array with the words you want to modify and check if the word is in that array

  4.     
    #3
    Too busy :|
    Website's:
    L337Fx.com BeastieBay.net
    Depends on which data variable you want to uppercase. Tell us the variable used to displaying those certain words.

    PHP Code: 
    <?php
    echo strtoupper($string);
    ?>

  5.     
    #4
    Member
    Thanks for the help, think i might be able to figure it out now

  6.     
    #5
    Member
    Or you can do it using CSS:
    Code: 
    .class{
    text-transform: uppercase;}

  7.     
    #6
    Member
    @bjskid: no, if he has some text and wants to capitalize certain words in it, CSS alone won't be enough, only if he already has some sort of markup around those words. Else he needs a scripting language, like JS or PHP to find the words.

  8.     
    #7
    Member
    Quote Originally Posted by deliteblogger View Post
    @bjskid: no, if he has some text and wants to capitalize certain words in it, CSS alone won't be enough, only if he already has some sort of markup around those words. Else he needs a scripting language, like JS or PHP to find the words.
    Yes, I know that. But I was just giving him another alternative.

  9.     
    #8
    Probation
    Website's:
    swooshleads.com
    Quote Originally Posted by Green Arrow View Post
    Hello i need a PHP code to make certain words like: hd, pdf, dvd, etc... to appear like: HD, PDF, DVD.
    PHP Code: 
    <?php
    $text 
    = array(
            
    'hd',
            
    'pdf',
            
    'dvd'
    );

    //set array map
    $output array_map('strtoupper'$text);
    ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Recommend me some words
    By RodneyTrot in forum General Discussion
    Replies: 19
    Last Post: 1st Sep 2012, 03:31 AM
  2. [IPB] Bad words Filter
    By immu in forum Webmaster Resources
    Replies: 0
    Last Post: 9th Jun 2012, 04:30 AM
  3. Why are bad words bad?
    By LEVAC109 in forum General Discussion
    Replies: 2
    Last Post: 28th Feb 2011, 09:53 PM
  4. What The Words Really Mean... just a little fun
    By Rosaanette in forum General Discussion
    Replies: 6
    Last Post: 23rd May 2010, 06:12 PM
  5. how to replace bad words?
    By wman in forum vBulletin
    Replies: 2
    Last Post: 19th Feb 2009, 12:18 PM

Tags for this Thread

BE SOCIAL