Basics Flashcards

1
Q

How to write a variable in php?

A

Dollar sign and then name of the variable.

$name = ‘Scott’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to write php code in a file?

A

You have to write the php tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does PHP stand for?

A

Hypertext Preprocessor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to get the length of an array?

A

count($arr);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to get the length of a string?

A

strlen($name);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you create an array?

A

array(1, 2, 3);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you log code to the screen? (2 ways)

A

echo

print

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you print an array?

A

print_r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly