As long as it is the same motor it should work. You would need to make sure that you do not need a new harness. Double check motor sizes and compare the number of heads in each, as well as bolt patterns.
The Accord and Civic did not use the same engine so no. There were probably also other changes that were made over the period of 5 years that would also make then not interchange even if the engines were the same.
Search Maintenance & Repair Questions
Maintenance & Repair Experts