PHP Doku:: Gets the value associated with a key - chdb.get.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteConstant hash databaseThe chdb classchdb::get

Ein Service von Reinhard Neidl - Webprogrammierung.

The chdb class

<<chdb::__construct

chdb Funktionen>>

chdb::get

(PECL chdb >= 0.1.0)

chdb::getGets the value associated with a key

Beschreibung

public string chdb::get ( string $key )

Gets the value associated with a key from a chdb database.

Parameter-Liste

key

The key for which to get the value.

Rückgabewerte

Returns a string containing the value associated with the given key, or NULL if not found.

Beispiele

Beispiel #1 chdb::get() example

<?php

$data 
= array(
    
'key1' => 'value1',
    
'key2' => 'value2',
    
// ...
);
chdb_create('data.chdb'$data);

$chdb = new chdb('data.chdb');
$value1 $chdb->get('key1');
$value2 $chdb->get('key2');

echo 
$value1PHP_EOL;
echo 
$value2PHP_EOL;

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

value1
value2

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",...)