lib/IgraalOSL/StatsTable/StatsTableBuilder.php
public function getAssocColumn($table, $columnName, $defaultValue = null)
    {
        $values = [];
        foreach ($table as $key => $line) {
            if (array_key_exists($columnName, $line)) {
                $values[$key] = $line[$columnName];
            } else {
                $values[$key] = $defaultValue;
            }
        }

        return $values;
    }
public function getAssocColumn($table, $columnName, $defaultValue = null)
    {
        $values = [];
        foreach ($table as $key => $line) {
            if (array_key_exists($columnName, $line)) {
                $values[$key] = $line[$columnName];
            } else {
                $values[$key] = $defaultValue;
            }
        }

        return $values;
    }
public function getAssocColumn ( $ table , $ columnName , $ defaultValue = null ) { $ values = [ ] ; foreach ( $ table as $ key => $ line ) { if ( array_key_exists ( $ columnName , $ line ) ) { $ values [ $ key ] = $ line [ $ columnName ] ; } else { $ values [ $ key ] = $ defaultValue ; } } return $ values ; }
Returns an associative table only with selected column.
Fill with default value if column not in a row
@param  array  $table
@param  string $columnName
@param  mixed  $defaultValue
@return array  The column
Returns an associative table only with selected column . Fill with default value if column not in a row