PHP Doku:: Set collation attribute - collator.setattribute.html

Verlauf / Chronik / History: (2) anzeigen

Sie sind hier:
Doku-Startseite ≥ PHP-Handbuch ≥ Funktionsreferenz ≥ Unterstützung menschlicher Sprache und Zeichenkodierung ≥ Internationalization Functions ≥ The Collator class ≥ Collator::setAttribute -- collator_set_attribute

Ein Service von Reinhard Neidl - Webprogrammierung.

The Collator class

<<Collator::getStrength -- collator_get_strength

Collator::setStrength -- collator_set_strength>>

Collator::setAttribute

collator_set_attribute

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)

Collator::setAttribute -- collator_set_attribute — Set collation attribute

Beschreibung

Object oriented style

bool Collator::setAttribute ( int $attr , int $val )

Procedural style

bool collator_set_attribute ( Collator $coll , int $attr , int $val )

Parameter-Liste

coll

Collator object.

attr

Attribute.

val

Attribute value.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 collator_set_attribute() example

<?php
$coll 
= collator_create( 'en_CA' );
$val  = collator_get_attribute( $coll, Collator::NUMERIC_COLLATION );
if (
$val === false) {
    
// Handle error.
} elseif ($val === Collator::ON) {
    
// Do something useful.
}
?>

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)