dbGet() can be used to retrieve data from the content database. For details and examples, see Using data fragments in PHP code and dbSet().
array|false dbGet(string key)
Important: dbGet() can only retrieve data that has been imported as a table or entered into the content database using dbSet(). The command cannot retrieve complex data structures that have been stored using dbStore(). Use dbRetrieve() for that.
Important: The content database can store content in different language versions (Multilingual Surveys) for the same key. If several language versions exist for a key, dbGet() returns the entry for the current interview language.
If the specified key exists in the database, the function always returns an Array – even if only one value was stored for the key.
If the specified key is not found in the database, the function returns false. In debug mode (
), but not in the finished questionnaire, a warning is also displayed if the key was not found.