php name Аечка age 18 min_age 14 echo name If age min_age if age min_a

 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
<?php
$name = "Аечка";
$age = 18;
$min_age = 14;
echo $name, "\n";
If ($age > $min_age);
if ($age > $min_age)echo("она совершеннолетняя xD"), "\n";
else echo("малолетка!!!!!");
$assoc_array = array('name' => 'Аечка', 'age' => 18, 'owner' => 'Жумег :3', 'xxx' => array(2 => 'O_O'));
echo "Он ", $assoc_array['owner'];
$users = array(
array('name' => 'Ayni', 'age' => 18, 'sex' => 'female'),
array('name' => 'Zhumarin', 'age' => 17, 'sex' => 'male')
);
$examin_age = count($users);
echo "юзеры:". $examin_age. "\n";
$total_users = count($users);
echo "Всего юзеров: ".$total_users."\n";
for ($i = 0; $i < $total_users; ++$i) {
if ($users[$i]['age'] >= 18 and $users[$i]['sex'] == 'female')echo "взрослая девушка:3 ";
else echo "малолетний лалка:3333 ";
echo $users[$i]['name'], "\n";
echo $users[$i]['age'], "\n";
}?>