I am new to PHP and I have a problem which I am trying to figure out.
Say a user inputted 5 strings in a form. Some of these strings can be null.
What I want to do is find out which ones are NOT null and print out the string name and value.
like this
5 strings = A B C D E
User inputs 5 for A, and 4 for E
program will output this
A 5
E 4
I want to use arrays instead of a million if then statements.
How is this done?
Say a user inputted 5 strings in a form. Some of these strings can be null.
What I want to do is find out which ones are NOT null and print out the string name and value.
like this
5 strings = A B C D E
User inputs 5 for A, and 4 for E
program will output this
A 5
E 4
I want to use arrays instead of a million if then statements.
How is this done?