From 2c7a373a36cba15317f68c47e7078f3ede7cb23a Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 13 Nov 2003 09:40:08 +0000 Subject: [PATCH] Update inifile and new function dba_key_split() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@144265 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/dba/functions/dba-fetch.xml | 13 +++++- reference/dba/functions/dba-firstkey.xml | 4 +- reference/dba/functions/dba-key-split.xml | 56 +++++++++++++++++++++++ reference/dba/functions/dba-nextkey.xml | 4 +- reference/dba/reference.xml | 16 ++++++- 5 files changed, 86 insertions(+), 7 deletions(-) create mode 100755 reference/dba/functions/dba-key-split.xml diff --git a/reference/dba/functions/dba-fetch.xml b/reference/dba/functions/dba-fetch.xml index 4be39a8a19..6c3bea3ec4 100644 --- a/reference/dba/functions/dba-fetch.xml +++ b/reference/dba/functions/dba-fetch.xml @@ -1,5 +1,5 @@ - + @@ -44,7 +44,7 @@ See also: dba_exists, dba_delete, dba_insert, - and dba_replace. + dba_replace and dba_key_split. @@ -54,6 +54,15 @@ + + + + When working with inifiles this function accepts arrays as keys + where index 0 is the group and index 1 is the value name. See: + dba_key_split. + + + diff --git a/reference/dba/functions/dba-firstkey.xml b/reference/dba/functions/dba-firstkey.xml index 3be4a9fd57..028e992ecf 100644 --- a/reference/dba/functions/dba-firstkey.xml +++ b/reference/dba/functions/dba-firstkey.xml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,7 @@ See also: - dba_nextkey + dba_firstkey, dba_key_split and example 2 in the DBA examples diff --git a/reference/dba/functions/dba-key-split.xml b/reference/dba/functions/dba-key-split.xml new file mode 100755 index 0000000000..d5a0df94f4 --- /dev/null +++ b/reference/dba/functions/dba-key-split.xml @@ -0,0 +1,56 @@ + + + + + + dba_key_split + Splits a key in string representation into array representation + + + Description + + array|falsedba_key_split + string|falsekey + + + dba_key_split returns &false; if key is NULL of + &false; or an array of the form array(0=>group,1=>value_name). + + + key the key in string representation. + + + See also: + dba_firstkey, dba_nextkey + and dba_fetch. + + + + + This function is available since PHP 5.0.0. + + + + + + + diff --git a/reference/dba/functions/dba-nextkey.xml b/reference/dba/functions/dba-nextkey.xml index 4981a27cee..9639f3781d 100644 --- a/reference/dba/functions/dba-nextkey.xml +++ b/reference/dba/functions/dba-nextkey.xml @@ -1,5 +1,5 @@ - + @@ -27,7 +27,7 @@ See also: - dba_firstkey + dba_firstkey, dba_key_split and example 2 in the DBA examples diff --git a/reference/dba/reference.xml b/reference/dba/reference.xml index b8c02fd8e3..07874e1723 100644 --- a/reference/dba/reference.xml +++ b/reference/dba/reference.xml @@ -1,5 +1,5 @@ - + Database (dbm-style) abstraction layer functions dba @@ -122,6 +122,20 @@ + + flatfile + + This is available since PHP 4.3.3 to be able to modify php.ini files + from within php scripts. When working with ini files you can pass arrays + of the form array(0=>group,1=>value_name) or strings of the form + "[group]value_name" where group is optional. As the functions + dba_firstkey and dba_nextkey + return string representations of the key there is a new function + dba_key_split available since PHP 5 which allows + to convert the string keys into array keys without loosing &false;. + + +