In this paper, we compute the projective dimension of the edge ideals of graphs consisting of some cycles and lines which are joint in a common vertex. Moreover, we show that for such graphs, the arithmetical rank equals the projective dimension. As an application, we can compute the arithmetical rank for some homogenous monomial ideals.