All are correct. It depends on how you pronounce it but they are all correct.

I was just wondering,i see different spellings etc.. is it ash-hadu an la ilaha il allah wa ashadu anna MUHAMMAD or MUHAMMADAN or MUHAMMADAR rasullallah? i see so many different ways of it being written im now confused