1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

compare html files

Discussion in 'PHP' started by playwright, Jun 5, 2010.

  1. #1
    Does anyone know if i can compare two html files? I want to use this statement to stop a do - while loop.
    For example i' m trying this one
    do{
    ...
    }while ($html1!=$html2);

    but it seems it never ends...
    Any ideas???
     
    playwright, Jun 5, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    but it seems it never ends...
    PHP:
    Use break;
     
    danx10, Jun 5, 2010 IP
  3. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Right as Dan said Break else it will go on
     
    roopajyothi, Jun 5, 2010 IP
  4. qrpike

    qrpike Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why dont you just use a while statement instead of a do-while.

    I dont understand your question though, what aspect of the site are you trying to compare and what results are you looking for?

    if($html1 == $html2){ echo 'same'; } // ???

    Explain your post some more and I might be able to help a little better, but a break; will just break outta the statement, which if you are doing that you need to know when to break out.

    - Scripteen.com
     
    qrpike, Jun 6, 2010 IP