Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: removing words

  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts

    Question removing words

    Hi im am using this code
    PHP Code:
    <?php print($link_data['display_name']); ?>
    right here, and what it does is it prints out titles for my links. Anyway what im trying to do is remove a single word from showing in the text when it is generated. so for example lets say I have the text "Server side development" showing from using that code above and I do not want "development" to show at all, just show "Server side". How can I do that? Can anybody help me? Thanks.
    Last edited by cosmicsea; 01-17-2010 at 02:40 PM.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Hi,

    PHP Code:
    $text =  str_replace("development"""$link_data['display_name']);
    print 
    $text

  • Users who have thanked sir pannels for this post:

    cosmicsea (01-17-2010)

  • #3
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sir pannels View Post
    Hi,

    PHP Code:
    $text =  str_replace("development"""$link_data['display_name']);
    print 
    $text
    Nice, That worked great. Thanks alot.
    I tried a str_replace before I posted this and it didn't work, I obviously didn't do it right so thanks for the help.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Your welcome


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •