To add English ordinal number suffix after normal number, following php function returns number with proper suffix. e.g. 1st, 2nd, 3rd, 4th, 5th, 6th… For php versions prior to 5.3. use following version. For php 5.3+, using the built in php function and it is even better because works with locale, just provide your locale.
This php masking function will allow first and the last 4 digits for any credit card number. You can also provide the masking letter. Credit card number has to be at least 13 character long. This is how you can call it.