One alternative, of course, is simply to use the $_POST elements and not duplicate them to scalar variables. It might even make your code slightly more efficient since you aren't going to the trouble of duplicating the contents in another, separate set of variables. 🙂
But if you feel you really need to, then the code above might work, if you first do a str_replace() on the key ($k) to replace the hyphens with underscores, and then do the assignment to the variable variable.