Skip to content

Instantly share code, notes, and snippets.

View VictorFursa's full-sized avatar
🙃
Focusing

Victor Fursa VictorFursa

🙃
Focusing
View GitHub Profile
<?php
header('Content-Type: text/html; charset=utf-8');
class Cars{
protected $mark;// марка
public $type; // тип
public $tonnage; // тонаж
protected $places; // места
public function setMark($mark,$places){
echo $mark . " " . $places . " мест";
}
<?php
header('Content-Type: text/html; charset=utf-8');
class Cars{
public $mark;// марка
public $type; // тип
public $tonnage; // тонаж
}
class Truck extends Cars {
public function __construct(){
echo $this->mark = "MAN ";
<?php
try
{
$pdo = new PDO("mysql:host=localhost;dbname=joke_db", "root", "");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('SET NAMES "utf8"');
}
catch (PDOException $e)
{
$output = 'Невозможно подключиться к серверу баз данных :('. " <br>" .$e->getMessage();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Города</title>
</head>
<body>
<form method="POST" action="city.php">
Город: <br>
<input type="text" name="city"/><br>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Города</title>
</head>
<body>
<form method="POST" action="city.php">
Город: <br>
<input type="text" name="city"/><br>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Гостевая книга</title>
</head>
<body>
<form method="POST" action="guest.php">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Города</title>
</head>
<body>
<form method="POST" action="city.php">
Город: <br>
<input type="text" name="city"/><br>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Города</title>
</head>
<body>
<form method="POST" action="city.php">
Город: <br>
<input type="text" name="city"/><br>
$a = array();
$n = 10;
$counter = 1;
for($i=0;$i < $n ;$i++){
for($j=0;$j <$n;$j++){
$a[$j][$i] = $counter;
$counter++;
}
}
var_dump($a);
$numbers = 100;
$a = array();
$z = array();
$x = array();
$array1 = array();
$array3= array();
$buffer = array();
for($i = 0; $i <= $numbers;$i++){
$a[] = $i;
}