need help looping add_action
-
i would like to know the proper way to do this
$dynValue=5;//loop this name times //start of my loop for ($num=1; $num <= $dynValue; $num++){ //note the incremented number ($num) in the call back add_action('add_meta_boxes', 'mpc_meta_box_'.$num.'); //below is where im having the problem // i am trying to increment this function name so i will not get the error that "function name has already been declared". i cannot add '.$num.' in the func name below cause its not valid php. function mpc_meta_box_'.$num.'(){ //some content } }//end of my loop
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘need help looping add_action’ is closed to new replies.