What I started with:
foreach($a as $b){if($b=='')return 0;}return 1; // works but verbose
My second attempt:
return (in_array('',$a)+0); // returns the opposite of what I need
What I am currently using:
return in_array('',$a)?'0':'1';
using a cast per JRL (shortest)
return (int)!in_array('',$a);
I assume this is the best way to do this, but just wanted to validate. Is this the best way to test for an empty value in an array?
I am aware that this tests for 0,NULL,FALSE or an empty string and that is O.K.
Other alternative: