Skip to content
Advertisement

How do I get a table to print only certain information from a file?

I’m going to apologize in advance. This is probably a very stupid question, but I can’t figure it out. What I’m trying to do is to use a radio button selection to look through a file and print out the things that align with the radio selection. Unfortunately, all it does is print the entire thing at once. How do I fix this?

JavaScript

I only included one of the smaller conditionals because they all look the same, seeing as I copy/pasted them and only changed the bits that needed to be changed.

Advertisement

Answer

You are on the right track. You just missed on = sign between $l_grades and “A”. Since it is $l_grades=”A” it is assigning the value “A” to $l_grades so it is always true. Try using:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement