Results 1 to 3 of 3

Thread: [RESOLVED] Replace Strings

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    117

    Resolved [RESOLVED] Replace Strings

    Sir,

    a="some text here<img src='tomy.jpg'>some text here"
    b="some one here <img src='kozhi.jpg'> some one here"
    c="somthing here<img src='rajeev.jpg'>somethingdfsjkdfd"
    d="somewhere here <img src='kozhi.jpg'> some where here"


    how can i replace all occurance of <img=%> (starting from <img= and end the string with '>') with some other string?
    please help....

    ram

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Replace Strings

    preg_replace('#<img([^>]+)>#', 'replacement string', $text);

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    117

    Re: Replace Strings

    Thank u sir...
    Your answer saved me.....

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