Find Number between 2 string

Discussion in 'PHP' started by bondigor69, Jun 17, 2012.

  1. #1
    how can i find anything between
    
    <span style="color: red;">Your Price</span>:$
    HTML:
    and

    <br>
    HTML:
    and echo this
     
    bondigor69, Jun 17, 2012 IP
  2. iMarcus

    iMarcus Active Member

    Messages:
    122
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #2
    You need to use regex (regular expressions) for that.

    /<\/span>\:\$(.*?)<br>/

    This ought to do it, but you can check your regex with this handy tool

    Hope this helps!
     
    iMarcus, Jun 17, 2012 IP