Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

PHP Exam Questions With Answers Graded A+

Note
-
Vendu
-
Pages
13
Qualité
A+
Publié le
24-06-2024
Écrit en
2023/2024

PHP Exam Questions With Answers Graded A+ when should you use single quotes? when there are no variables in the string; if you use single quotes, PHP will not search for variables to replace, which can enhance speed. when should you use double quotes? when a variable contains any amount of variables; in general. can variable names begin with numbers? no. can variable names begin with underscores? yes. can variable names contain symbols? no. are variable names case-sensitive? yes. what should be used to have multiple quotations in one string? the escape character '': $string = "I said "Hello" to the man."; can a string with numbers be used as a number? yes. $string = "2"; can be used as $string = 2; can be used. what character must all variables begin with? the dollar sign $. is data shown in the URL if GET is used? yes; use for search engines, catalogued pages, pages that would be bookmarked. is data shown in the URL if POST is used? no; use for passwords, pages that would not be bookmarked, pages that require security. what should the action attribute's value contain? the URL to the php script that will handle the information in the form. where is data sent using POST found? predefined variable $_POST where is data sent using GET found? predefined variable $_GET what type of variable is $_SERVER $_SERVER is a predefined variable. what type of variable is $_POST? predefined variable. what type of variable is $_GET? predefined variable. will print $_POST work? why or why not? no, because you cannot use the print function on arrays

Montrer plus Lire moins
Établissement
Cours

Aperçu du contenu

PHP Exam Questions With Answers Graded
A+
when should you use single quotes?
when there are no variables in the string; if you use single quotes, PHP will not search for variables to
replace, which can enhance speed.


when should you use double quotes?
when a variable contains any amount of variables; in general.


can variable names begin with numbers?
no.


can variable names begin with underscores?
yes.


can variable names contain symbols?
no.


are variable names case-sensitive?
yes.


what should be used to have multiple quotations in one string?
the escape character '\':
$string = "I said \"Hello\" to the man.";


can a string with numbers be used as a number?
yes.
$string = "2";
can be used as
$string = 2;
can be used.


what character must all variables begin with?
the dollar sign $.


is data shown in the URL if GET is used?
yes; use for search engines, catalogued pages, pages that would be bookmarked.


is data shown in the URL if POST is used?
no; use for passwords, pages that would not be bookmarked, pages that require security.


what should the action attribute's value contain?
the URL to the php script that will handle the information in the form.

, where is data sent using POST found?
predefined variable $_POST


where is data sent using GET found?
predefined variable $_GET


what type of variable is $_SERVER
$_SERVER is a predefined variable.


what type of variable is $_POST?
predefined variable.


what type of variable is $_GET?
predefined variable.


will print $_POST work? why or why not?
no, because you cannot use the print function on arrays.


will print $_GET work? why or why not?
no, because you cannot use the print function on arrays.


will print $_SERVER work? why or why not?
no, because you cannot use the print function on arrays.


what can be used to print data in an array?
not print; print_r (human readable) can be used.


can arrays contain arrays?
yes, they commonly do contain arrays.


what is an 'index' or 'key'?
what is referred to for a value within an array.
$_POST['name'] may be equal to 'Jane Doe'
$cards[4] may be equal to 'BMW'


what will happen if $_POST['name'] is used in double quotes?
a parse error will occur, to avoid this, create shorthand variables like:
$name1 = $_POST['name1'];
$name2 = $_POST['name2'];


how do you know what to use to get a value from POST or GET?
they are the values of the name attributes of the input tags in the form.
$_POST['name'] or $_GET['name'] refers to the value of <input name="name" /> (depending on the
method of the form).

École, étude et sujet

Cours

Infos sur le Document

Publié le
24 juin 2024
Nombre de pages
13
Écrit en
2023/2024
Type
Examen
Contenu
Questions et réponses

Sujets

10,43 €
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
LectDan Teachme2-tutor
S'abonner Vous devez être connecté afin de pouvoir suivre les étudiants ou les formations
Vendu
220
Membre depuis
3 année
Nombre de followers
158
Documents
7954
Dernière vente
3 jours de cela

4,0

47 revues

5
25
4
12
3
2
2
3
1
5

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions