Welcome to WebmasterWorld Guest from 220.127.116.11
When I run the following code on Apache on Windows:
$string = "<body><new></new><tr><td>dfdfdfdfdf</td></tr><content>Sdsdfdfdfd</content></body>";
It returns 40.
But when I run the same code on IIS on Windows it returns 74. The problem is due to the / with tr.
I tried using // and \/ to escape but didn't work. How do I make it work?
Strrpos in PHP4 only takes a single character to search for, not a string. If you enter a string it'll just search for the first character of that string. Which in your example is '<' which is at position 74.
To get it to work upgrade to PHP5 or use something different to strrpos.