Sae Vorbereitung Wddf910 - Test 2 - JavaScript&PHP

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Raijin
R
Raijin
Community Contributor
Quizzes Created: 1 | Total Attempts: 92
| Attempts: 92 | Questions: 40
Please wait...
Question 1 / 40
0 %
0/100
Score 0/100
1. Was macht foreach ($row as $key=>$value){}

Explanation

Die foreach-Schleife durchläuft jedes Element des Arrays $row und speichert den Schlüsselwert in der Variablen $key und den entsprechenden Wert in der Variablen $value. Dadurch können die Schlüsselwertpaare des Arrays weiterverarbeitet oder ausgegeben werden.

Submit
Please wait...
About This Quiz
Sae Vorbereitung Wddf910 - Test 2 - JavaScript&PHP - Quiz

Sie müssen min. 80% erreichen um den Test zu bestehen


Test by Max

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. Was passiert bei window.location.href

Explanation

The statement "window.location.href" is used to access the current URL of the window or to navigate to a new URL. Therefore, when this code is executed, it will navigate to a specific URL.

Submit
3. Lassen sich in Mysql Tabellen auch Binärdaten abspeichern?

Explanation

In Mysql können Binärdaten in Tabellen gespeichert werden.

Submit
4. Zeichen für eine Variable in PHP

Explanation

The correct answer is "$". In PHP, the dollar sign ($) is used to indicate a variable. This symbol is used before the variable name to declare and access its value.

Submit
5. Welche 3 Mehtoden sind bekannt um Textfiles auszulesen ?

Explanation

The correct answer is file(), fopen(), fgets(), and file_get_contents(). These are three commonly used methods in PHP to read text files. The file() function reads the entire file into an array, with each line of the file as an element of the array. The fopen() function opens a file and returns a file pointer, which can be used to read the file. The fgets() function reads a single line from the file. The file_get_contents() function reads the entire contents of a file into a string.

Submit
6. Einfache Rückmeldung an den Benutzer

Explanation

The correct answer is "alert("ruckmeldung")". This answer is correct because the "alert()" function in JavaScript displays a simple message box with the specified message, in this case "ruckmeldung". This provides a simple feedback or notification to the user. The other options, "popup("test")" and "windo.open("test")", are not valid JavaScript functions and would result in errors. Therefore, the correct option is to use the "alert()" function to provide a simple feedback to the user.

Submit
7. Eine neue fpdf-Klasse erzeugen

Explanation

The correct answer is $pdf = new fpdf(); In this code, a new object of the fpdf class is being created and assigned to the variable $pdf. This allows the use of the fpdf class's functions and methods to generate PDF documents. The other line of code "$pdf = new f-pdf();" is incorrect because it contains a syntax error with the hyphen in the class name.

Submit
8. Unterschied zwischen fetch_array und fetch_assoc

Explanation

The correct answer states that fetch_array creates both a numeric and associative array.

Submit
9. Was ist Javascript?

Explanation

Javascript ist eine clientseitige Scriptsprache. Das bedeutet, dass sie im Webbrowser des Benutzers ausgeführt wird und dort interaktive Funktionen auf einer Webseite ermöglicht. Im Gegensatz dazu wird eine serverseitige Scriptsprache auf dem Server ausgeführt, um Daten zu verarbeiten, bevor sie an den Browser gesendet werden.

Submit
10. Wie bezeichnet man $_SESSION ?

Explanation

The correct answer is "Superglobale." In PHP, $_SESSION is a superglobal variable that is used to store and access session data across multiple pages or requests. It is an associative array that holds information about the current session, such as user-specific data or login credentials. Superglobal variables are accessible from any scope within a PHP script, making them widely used and convenient for passing data between different parts of a program.

Submit
11. Wofür ist der Befehl .substr

Explanation

Der Befehl .substr wird verwendet, um einen Teilstring aus einem vorhandenen String zurückzugeben. Es ermöglicht, einen bestimmten Abschnitt des Strings basierend auf der angegebenen Startposition und der Länge des Teilstrings auszuwählen und zurückzugeben.

Submit
12. Welche Aussage stimmt in Bezug auf Funktionen?

Explanation

Functions ermöglichen eine sinnvolle und logische Aufteilung von Programmabschnitten. Durch die Verwendung von Funktionen kann der Code in kleinere, wiederverwendbare Teile aufgeteilt werden, was die Lesbarkeit, Wartbarkeit und Skalierbarkeit des Codes verbessert. Funktionen ermöglichen auch die Modulbildung, indem sie bestimmte Aufgaben isolieren und separat behandeln. Dies führt zu einer klareren Struktur des Codes und erleichtert die Fehlerbehebung und das Testen.

Submit
13. Anweisung die bestimmten Code ausführt wenn die Bedingung erfüllt ist

Explanation

The correct answer is "if-anweisung". This is because an "if-anweisung" (if statement) is a programming construct that executes a certain block of code only if a specified condition is true. It allows for conditional execution, where the code inside the if statement is executed only when the given condition is met.

Submit
14. Wie greift man auf ein element mit der ID mein Elment zu?

Explanation

To access an element with the ID "meinElment", the correct way is to use the method "getElementById" from the "document" object. This method searches for an element in the HTML document with the specified ID and returns that element. The other options provided, "window.getElementById" and "document.getElementBy", are not valid methods and will result in an error.

Submit
15. Daten auf Festplatten manipulieren mit JS

Explanation

not-available-via-ai

Submit
16. Kann man mit PHP css Code ausgeben?

Explanation

Ja, man kann mit PHP CSS-Code ausgeben. PHP ist eine serverseitige Skriptsprache, die in HTML-Dokumente eingebettet werden kann. Mit PHP kann man dynamisch CSS-Code generieren und in das HTML-Dokument einfügen. Dies ermöglicht es, das Aussehen einer Webseite basierend auf bestimmten Bedingungen oder Variablen zu ändern. PHP bietet Funktionen wie "echo" oder "print", mit denen CSS-Code direkt in das HTML-Dokument ausgegeben werden kann.

Submit
17. Was macht der Befehl strstr($variable, "string") ?

Explanation

Der Befehl strstr($variable, "string") sucht in einem String nach einer bestimmten Zeichenkette.

Submit
18. Es soll die Javascript Funktion setDate aufgerufen werden. Dazu Bietet sich zahlreiche Events an einer ist falsch Welche?

Explanation

The given line of code "onreleaseoutside = "setDate()";" is incorrect because there is no event called "onreleaseoutside" in JavaScript. Therefore, calling the setDate() function using this event will not work.

Submit
19. Kann mit php dynamisch css und javascript erstellt werden?

Explanation

Yes, with PHP it is possible to dynamically create CSS and JavaScript. PHP can generate dynamic content, including CSS and JavaScript code, based on certain conditions or user input. This allows for more flexibility and customization in web development.

Submit
20. Wofür stehen die Variablen $key und $value

Explanation

Die Variablen $key und $value stehen für Schlüssel-Werte-Paare einer Tabellenzeile. Das bedeutet, dass $key den Schlüsselwert und $value den dazugehörigen Wert repräsentiert. In einer Tabellenzeile können verschiedene Informationen gespeichert werden, die jeweils durch einen eindeutigen Schlüssel identifiziert werden. Durch die Verwendung von $key und $value können diese Schlüssel-Werte-Paare effizient verarbeitet und manipuliert werden.

Submit
21. Wie zählt man alle Einträge  einer SQL Tabelle

Explanation

The correct answer is SELECT count(*) FROM tabelle. This query will count all the entries in the SQL table named "tabelle". The count(*) function counts all the rows in the table and returns the result.

Submit
22. Beste schleife um die jeweiligen Keys eines Arrays auszulesen

Explanation

The correct answer is "foreach". The foreach loop is used to iterate over each element in an array and perform a specific action. It allows us to access the keys and values of an array without needing to manually manage an index or counter variable. Therefore, the foreach loop is the best choice for extracting the keys of an array.

Submit
23. Wie überprüft man einen Regex Code zb einer email

Explanation

The correct answer is "preg-match()". This function is used to perform a regular expression match on a given string. In the context of checking a regex code for an email, preg-match() can be used to determine if the email matches the specified pattern. It returns 1 if there is a match and 0 if there is no match.

Submit
24. Was macht mysql_fetch_array()

Explanation

mysql_fetch_array() ist eine Funktion in PHP, die einen Datensatz aus einer MySQL-Datenbank abruft und in ein Array umwandelt. Dies ermöglicht es, auf die einzelnen Werte des Datensatzes zuzugreifen und sie in der Anwendung zu verwenden. Die Funktion gibt das Array zurück, das die Werte des Datensatzes enthält.

Submit
25. Wie lautet der Befehl zur Entfernung von HTML Tags aus einem String?

Explanation

The correct answer is strip_tags();. This function is used to remove HTML tags from a string in PHP. It takes a string as input and returns the string with all HTML tags removed. This can be useful when you want to sanitize user input or when you need to extract only the plain text content from an HTML document.

Submit
26. Was kann Javascript mit dem Objekt .style bewirken?

Explanation

Javascript kann mit dem Objekt .style temporäre Änderungen an der CSS im Browser bewirken. Das bedeutet, dass Javascript die Eigenschaften und Werte der CSS-Regeln eines Elements ändern kann, um beispielsweise das Aussehen oder das Verhalten der Webseite dynamisch anzupassen. Diese Änderungen sind jedoch nur vorübergehend und werden nicht dauerhaft gespeichert.

Submit
27. Wie macht man einen Zeilenumbruch in Php?

Explanation

The correct answer is echo "/n". In PHP, the escape sequence for a newline is "\n". By using the echo statement, we can output a newline character to create a line break in the displayed text.

Submit
28. Wie erzeugt man Konstanten?

Explanation

The correct answer is define("TEST, "Hallo Welt");. This is because the define() function in PHP is used to define a constant. In this case, the constant named "TEST" is being defined with the value "Hallo Welt". The static() and refind() functions mentioned in the other options are not valid functions in PHP for defining constants.

Submit
29. Wie beendet man eine Session in PHP ?

Explanation

The correct answer is session_destroy(). This function is used in PHP to end a session and release all session variables. It destroys all data registered to a session and clears all session variables. By calling this function, the session data is removed from the server and the client's session cookie is deleted. This ensures that the session is completely terminated and no longer accessible.

Submit
30. Wozu verwendet man RTF Texte?

Explanation

RTF Texte werden verwendet, um formatierte Vorlagen mit dynamischen Schlüsselwörtern zu erstellen. Diese Vorlagen können dann verwendet werden, um automatisch generierte Texte zu erstellen, indem die dynamischen Schlüsselwörter mit den entsprechenden Daten ersetzt werden. Dies ermöglicht eine effiziente Erstellung von Dokumenten mit wiederkehrendem Inhalt, wie zum Beispiel Serienbriefe oder Berichte.

Submit
31. Wo muss man den Fehler meistens suchen wenn man einen PHP Parse ERROR bekommt?

Explanation

When encountering a PHP Parse ERROR, the most common place to search for the error is the line directly above the line where the error is indicated. This is because the error is often caused by a mistake or syntax issue in the line preceding the error. By checking the line above, you can identify and correct any errors that may have led to the Parse ERROR.

Submit
32. Wo muss die Funktion exit() im Quellcode stehen, damit sie keine Fehlermeldung erzeugt ?

Explanation

The function exit() should be placed before any output is sent to the browser in order to avoid generating an error message.

Submit
33. Wie verbindet man in Javascript mehrere Befehle?

Explanation

In Javascript, multiple commands can be connected using the dot (.) operator. This is known as the dot notation and is used to access properties or methods of an object. By using the dot operator, you can chain together multiple commands to perform a sequence of actions.

Submit
34. Es soll eine Popup Meldung mit Ok Button auf dem Bildschirm erstellt werden? Welchen Befehl muss hierbei verwendet werden?

Explanation

The correct answer is "alert()". This function is used to create a popup message with an OK button on the screen. It is commonly used in JavaScript to display messages or notifications to the user.

Submit
35. Wie kann man die Anzahl der Elemente eines Arrays auslesen $test = array('wert1','wert2');

Explanation

The correct answer is count($test). In PHP, the count() function is used to count the number of elements in an array. In this case, the array $test has two elements, 'wert1' and 'wert2', so the count($test) will return 2. The other options, .length, .count, and test.count() are not valid syntax or functions in PHP for counting the elements of an array.

Submit
36. Was ist $_POST

Explanation

$_POST ist ein assoziatives Array, das alle mit POST übertragenen Daten enthält. Wenn ein Formular mit der Methode POST abgeschickt wird, werden die Werte der Eingabefelder als Schlüssel-Wert-Paare im $_POST Array gespeichert. Dies ermöglicht es, auf die übertragenen Daten zuzugreifen und sie in der weiteren Verarbeitung zu verwenden. Daher ist die Aussage "Ein assoziatives Array aller mit POST übertragener Daten" korrekt.

Submit
37. Was ist keine Supergobale?

Explanation

The given options are all PHP superglobals, which are predefined variables that are always accessible from any scope. However, $_FOLDER is not a valid PHP superglobal.

Submit
38. Liefert mysql_insert_id(); die ID der kommenden Inser-Operation

Explanation

The mysql_insert_id() function does not return the ID of the upcoming insert operation. It actually returns the ID generated by the most recent insert operation in the current connection. Therefore, the correct answer is "Nein" (No).

Submit
39. Kann man Variablen die Außerhalb einer Funktion erstellt wurden verändern?

Explanation

Variables that are created outside of a function are known as global variables. These variables can be accessed and modified from anywhere within the program, including inside functions. Therefore, the correct answer is "No" as global variables can be modified.

Submit
40. Welche der folgenden variablen ist gültig ?

Explanation

The correct answer is "Var ersteZahl = 5". This is a valid variable declaration in JavaScript, where "Var" is used to declare a variable and "ersteZahl" is the variable name. The value assigned to the variable is 5.

Submit
View My Results

Quiz Review Timeline (Updated): Jul 22, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 22, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 07, 2011
    Quiz Created by
    Raijin
Cancel
  • All
    All (40)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Was macht foreach ($row as $key=>$value){}
Was passiert bei window.location.href
Lassen sich in Mysql Tabellen auch Binärdaten abspeichern?
Zeichen für eine Variable in PHP
Welche 3 Mehtoden sind bekannt um Textfiles auszulesen ?
Einfache Rückmeldung an den Benutzer
Eine neue fpdf-Klasse erzeugen
Unterschied zwischen fetch_array und fetch_assoc
Was ist Javascript?
Wie bezeichnet man $_SESSION ?
Wofür ist der Befehl .substr
Welche Aussage stimmt in Bezug auf Funktionen?
Anweisung die bestimmten Code ausführt wenn die Bedingung...
Wie greift man auf ein element mit der ID mein Elment zu?
Daten auf Festplatten manipulieren mit JS
Kann man mit PHP css Code ausgeben?
Was macht der Befehl strstr($variable, "string") ?
Es soll die Javascript Funktion setDate aufgerufen werden. Dazu Bietet...
Kann mit php dynamisch css und javascript erstellt werden?
Wofür stehen die Variablen $key und $value
Wie zählt man alle Einträge  einer SQL Tabelle
Beste schleife um die jeweiligen Keys eines Arrays auszulesen
Wie überprüft man einen Regex Code zb einer email
Was macht mysql_fetch_array()
Wie lautet der Befehl zur Entfernung von HTML Tags aus einem String?
Was kann Javascript mit dem Objekt .style bewirken?
Wie macht man einen Zeilenumbruch in Php?
Wie erzeugt man Konstanten?
Wie beendet man eine Session in PHP ?
Wozu verwendet man RTF Texte?
Wo muss man den Fehler meistens suchen wenn man einen PHP Parse ERROR...
Wo muss die Funktion exit() im Quellcode stehen, damit sie keine...
Wie verbindet man in Javascript mehrere Befehle?
Es soll eine Popup Meldung mit Ok Button auf dem Bildschirm erstellt...
Wie kann man die Anzahl der Elemente eines Arrays auslesen $test =...
Was ist $_POST
Was ist keine Supergobale?
Liefert mysql_insert_id(); die ID der kommenden Inser-Operation
Kann man Variablen die Außerhalb einer Funktion erstellt wurden...
Welche der folgenden variablen ist gültig ?
Alert!

Advertisement