public static function compileAttributeStringFromArray(array $array): string
    {
        $attributeString = '';

        foreach ($array as $key => $value) {
            if (null === $value || (\is_bool($value) && $value)) {
                $attributeString .= "$key ";
            } else if (!\is_bool($value)) {
                $attributeString .= "$key=\"$value\" ";
            }
        }

        return $attributeString ? ' ' . $attributeString : '';
    }
public static function compileAttributeStringFromArray(array $array): string
    {
        $attributeString = '';

        foreach ($array as $key => $value) {
            if (null === $value || (\is_bool($value) && $value)) {
                $attributeString .= "$key ";
            } else if (!\is_bool($value)) {
                $attributeString .= "$key=\"$value\" ";
            }
        }

        return $attributeString ? ' ' . $attributeString : '';
    }
public static function compileAttributeStringFromArray ( array $ array ) : string { $ attributeString = '' ; foreach ( $ array as $ key => $ value ) { if ( null === $ value || ( \ is_bool ( $ value ) && $ value ) ) { $ attributeString .= "$key " ; } else if ( ! \ is_bool ( $ value ) ) { $ attributeString .= "$key=\"$value\" " ; } } return $ attributeString ? ' ' . $ attributeString : '' ; }
Walk through the array and create an HTML tag attribute string

@param array $array

@return string
Walk through the array and create an HTML tag attribute string