You could store the code in the database for contents.
From there, you can retrieve it via dbGet(), and then use it in the PHP code.
$data = dbGet('api-key');
$key = $data[0];
The function, you had probably looked for, was getTextElement().
As there has never been a function getText()
, your question indicates that you may have asked ChatGPT or another tool for a solution instead of reading the manual. Know, that ChatGPT has not read the SoSci Survey manual, either. Therefore, ChatGPT is essentially just giving you hallucinations on how to use SoSci Survey. If you want to work with generative AI: Gemini at least knows the instructions for SoSci Survey. Please note, however, that even then the answers from generative AI are only correct with a chance of approx. 65%.