Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

header_remove

Description

The header_remove of Network for PHP remove previously set headers.

Syntax

header_remove(?string $name = null): void

Parameters

name

The header name to be removed. When null, all previously set headers are removed.

Note: This parameter is case-insensitive.

Return

No value is returned.

Examples

1 · null

<?

header("My-Header-1: Test");
header("My-Header-2: Test");
header("My-Header-3: Test");

header_remove();

print_r(headers_list());

?>
Array
(
)

2 · name

<?

header("My-Header-1: Test");
header("My-Header-2: Test");
header("My-Header-3: Test");

$name = "My-Header-2";

header_remove($name);

print_r(headers_list());

?>
Array
(
    [0] => My-Header-1: Test
    [1] => My-Header-3: Test
)
HomeMenu