I thought about involving transparency by "making a sandwich" with a tile layer at the bottom, then the player and then the same tile layer on top, but slightly transparent. But when I tried it, the player looked like some king of ghost floating around and it was not clear where the player stands exactly.
Other games (like Age of Empires) managed this by displaying overlapped characters as an outline but this is really complicated/CPU-intensive using PHP, as far as I know.
I have no idea on how to approach this problem. Any ideas?