This will probably give you what you want, but slightly different from the Excel equivalent, so you'll have to play with it a little:

T = Term of the loan in years

R = Annual interest rate expressed as a Decimal (10% = 0.1)

A = Amount of the loan.

function PMT ($T, $R, $A ) {

$x = 1 / (1 + ( $R / 12 ) );

return ( ( 1 - $x ) * $A) / ($x * (1 - pow( $x, $T ) ) );

}

Note that I haven't tested this against the Excel PMT, I've just re-written an old C++ function I have to achive the same in PHP.