|
Posted by Janwillem Borleffs on 01/15/06 01:12
windandwaves wrote:
> What is the most efficient way to do this? Is there a function that I
> can use? Something like
>
AFAIK, there isn't an out-of-the-box function for this, so all I can offer
you is an alternative to what you have posted:
function datafieldcheck($ma, $fld) {
$current = current($ma);
if (isset($current[$fld])) {
$v = $current[$fld];
while (false !== ($current = next($ma))) {
if (!isset($current[$fld]) || strcmp($v, $current[$fld])) {
return false;
}
}
return true;
}
return false;
}
JW
Navigation:
[Reply to this message]
|