If the variable is always going to be a string of numbers, i.e. '1111' or '1234', why use a slow, pattern-matching function such a ereg? Seems like the "killing a fly with a cannon" type thing. Try this instead:
if(!is_numeric($N_price[$i]))
{
NOTE: This will NOT work for floats (i.e. '1111.2'). To mix floats and integers in your price, try this:
if(!is_numeric($N_price[$i]) && !is_float($N_price[$i]))
{
Hope this helps.