-
Notifications
You must be signed in to change notification settings - Fork 0
/
Exercise_06.1.php
34 lines (25 loc) · 934 Bytes
/
Exercise_06.1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Tehtävänäsi on täydentää alla olevaa ohjelmaa määrittelemällä puuttuvat muuttujat niin, että ohjelman tulostus
vastaa esimerkkitulostusta. Tekstikenttään kirjoitetaan siis vain puuttuvat lauseet, ei koko ohjelmaa.
Täydennettävä ohjelma:
<?php
// Sinun koodi tulee tähän
$tulostus = implode(",",$a);
echo $teksti;
echo "Ostin $lkm {$elain}a.\n";
echo "Taulukon sisältö: $tulostus";
?>
Example output:
Lainausmerkkien(" ja ") sisällä voi käyttää kenoviivalla(\) merkittyjä erikoiskoodeja.
Ostin 3 kissaa.
Taulukon sisältö: 9,7,5 */
<?php
### put your code here ###
$teksti = "Lainausmerkkien(\" ja \") sisällä voi käyttää kenoviivalla(\\) merkittyjä erikoiskoodeja.\n";
$a = array(9, 7, 5);
$elain = "kissa";
$lkm = 3;
$tulostus = implode(",",$a);
echo $teksti;
echo "Ostin $lkm {$elain}a.\n";
echo "taulukon sisätlö: $tulostus";
?>