Let R be a commutative semiring with identity. Let φ : I(R) ! I(R) [ f;g be a function where I(R) is the set of ideals of R. A proper ideal I of R is called φ-primary if whenever a; b 2 R, ab 2 I − φ(I) implies that either a 2 I or b 2 pI. So if we take φ;(I) = ; (resp., φ0(I) = 0; φ2(I) = I2), a φ-primary ideal is primary (resp., weakly primary ideal, almost primary ideal). In this paper we study the properties of several generalizations of primary ideals of R.