I need to grab for the name for a input field.
All of them start with
inf_custom_InvitationCode and they have a number appended to the end of them.
and so on. They could be different depending on the form.
How can I search for this and grab the data?
If the fields are named 'inf_custom_InvitationCode###' and you control the source of the data being submitted to your form, you may be better off changing the code that creates the client-side form to name the input fields 'inf_custom_InvitationCode' (all of them can use that same name). If you do this, PHP will take all the input values and add them as a single key to the $_REQUEST (and $_GET or $_POST)) array, which you can then use as you would any array.
Otherwise, you the PHP manual contains something that does something like what you want to use.
print_r($_POST)look like - A B 2012-04-04 01:00