Does not compute....
PHP is a server-side computer language. You write programs in PHP. PHP programs typically create HTML as output, but might also create plain text, XHTML, WML, whatever.
XHTML and WML are presentation languages. They are used to format text for presentation.
There's no possible way to "convert PHP to xhtml or wml". They don't do the same thing, and don't have equivalent functionality.
The right question is "how do I adapt my website - written in PHP - to accommodate mobile browsers using xhtml and/or wml?
Unfortunately, we can't answer that question with the information you've given. We don't know anything about your PHP software. Was it custom-written for you? Are you using a CMS or blog software written in PHP? Some other software package written in PHP?