In this paper, a new approach for function approximation is proposed to obtain better approximated performance. It is well known that gradient-based learning algorithms such as backpropagation (BP) algorithm have good ability of local search, whereas particle swarm optimization (PSO) has good ability of global search. Therefore, in the new approach, adaptive PSO (APSO) is applied to train network to search global minima firstly, and then with the trained weights produced by APSO the network is trained with a constrained learning algorithm (CLA). Moreover, the CLA encodes a priori information of the approximated function. Due to combined APSO with the CLA, the new approach has better approximated performance. Finally, simulation results are given to verify the efficiency and effectiveness of the proposed learning approach.