need help looping add_action in wp

You can try something like this:

$dynValue=5;//loop this many times
//start of my loop
for ($num=1; $num <= $dynValue; $num++){
    add_action('add_meta_boxes', create_function('', '//some content'));
    // Write the php code as if it was to put it in an echo/print instruction.
    // More details: http://php.net/manual/en/function.create-function.php
}//end of my loop