Deleting everything to the right of a point in a string...
Results 1 to 2 of 2

Thread: Deleting everything to the right of a point in a string...

  1. #1
    Senior Member
    Join Date
    Oct 2003
    Posts
    282

    Deleting everything to the right of a point in a string...

    Spicy Chicken Drumsticks Recipe: http://grandmotherskitchen.org/recip...rumsticks.html


    If I wanted to delete everything in that string starting at "Recipe:",

    how would I do that?
    I <3 PHP Builder!

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,354
    One way:

    PHP Code:
    $str 'Spicy Chicken Drumsticks Recipe: http://grandmotherskitchen.org/recip...rumsticks.html';
    echo 
    substr($str0strpos($str' Recipe:')); // Spicy Chicken Drumsticks 

Thread Information

Users Browsing this Thread

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

Posting Permissions

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