0 votes
in SoSci Survey (dt.) by s106372 (175 points)
edited by SoSci Survey

Hallo lieber Support,

ich möchte in PHP einen Array mit Strings beladen, shuffeln, und dann einzelne Elemente auf den Umfrageseiten anzeigen. Das klappt mit Dummy-Texten ganz wunderbar, aaaber:

Meine Strings enthalten das Wort "new" (Englische Texte). Ich bekomme daraufhin den Fehler: "Warning: The PHP keyword new is not allowed within PHP code."

Ich belade meinen Array wie folgt:

$texts = array(
   "a1" => "text text text",
   "a2" => "new text new text",
);

(Vereinfacht, der echte Array hat 98 Elemente)

Ich bin zwar ein PHP-Newbie, aber im Internet konnte ich nichts zu diesem Fehler finden.
Wenn ich explizites Typesetting via settype() probiere bekomme ich den Fehler: "Warning: The function settype() is disabled for the questionnaire."

Habt ihr eine Idee?

Viele Grüße

1 Answer

0 votes
by SoSci Survey (305k points)
selected by s106372
 
Best answer

Die ausführliche Antwort finden Sie in der Anleitung zur Funktion html() ganz unten :)

Kurze Antwort:

$texts = array(
   "a1" => "text text text",
   "a2" => "ne"."w text ne"."w text",
);
by s106372 (175 points)
Mega. Vielen Dank für die schnelle Hilfe! Jetzt klappt es!

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...