Some questions about Selenium

Some general questions about selenium:

1 - Can I make a test that if a condition is MET the test fails? I want to test for php errors, and if they are found, fail the test.
2 - Can I make a test that iterates a value, or reads a set of values from a file or array? I want to type something like the #s 1 - 99, hit submit for a form, and verify the results.

Workarounds that achieve the same effect would be great, too.