sorry if this is a simple question, I just moved into web dev from being a Jr. Systems Admin so I'm still pretty new.
As my first project, I am building a php web app that will upload an accounting file(plain text), parse it line by line, strip the excess stuff, and then display it.
I already have the uploading and displaying part completed (using fopen and fgets to return it line by line).
Now what I would like to know is how I can get php to only echo the lines that start with 4 numbers (the reason for this is that there are titles and headers on every new page, its a multi page document, and the account numbers range from either 4 numbers to 8 numbers).
Would I use substr() or mb_substr() to specify a check of the first 4 characters of every new line that fgets() puts out, and then use is_numeric() to check if they are numbers?
PS: Sorry if my terminology is slightly off. I have a degree in finance and have been self-teaching myself coding, completely different world lol.