PHP can do the same. For ADOdb (excelent database wrapper)it can be as the following: $conn->Execute('UPDATED foo SET bar=? WHERE id=?', array("foo'bar", 123));