Use filter_var_array on whole array, or inside iteration
Is this really the bottleneck in you application? If not choose the readable one. See Effective Java, 2nd Edition, Item 55: Optimize judiciously I know that this is a Java book but this chapter (and many others) is useful for every developer.

Some other notes:


I'd call the filtered variable something which shows that the data has been filtered, like $filtered_row. It would improve readability and help maintainers.
The code prints the first name and the last name without any separator character. I'd consider printing a separator there:

print '&lt;p&gt;' . $sql_row['first_name'] . ' ' . $sql_row['last_name'] . '&lt;/p&gt;';

If you use only the first_name and the last_name maybe you should only filter these fields not the whole array. (I don't know whether it contains other values or not.)
Consider memory usage too. If I'm right the first one have to store the input and output array in the memory during the filtering which needs two times of the array size of memory temporarily. In the second case it's much smaller since it filters only one row at a time so it needs memory for the array once and two times of the size of a row during the filtering.