Theres the strrev() that reverse the string contents. you could make a temp string to hold the reverse of the orignal and then compare it?