Results 1 to 3 of 3

Thread: Few string questions..

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Few string questions..

    First, how can i replace part of a string, in a string? str_replace(just a guess)?

    Secondly, how can i determine what the letter is of a character anywhere in a string?
    ex:
    yaytaweuih

    and then i want to find the 5th letter which is a

  2. #2
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: Few string questions..

    Yeah, str_replace() will work, theirs some other alternatives like preg, but the manual can probably explain it better than I, and has some alternative links as well.
    str_replace()
    For your second question, sounds like substr() is what you're looking for. substr()
    {yak}

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Few string questions..

    You can also use preg_replace() and preg_replace_callback() to find and replace strings matching regular expressions.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width