Какой самый быстрый ( в плане оптимизации) способ это провернуть?
<avatar><img src="D:\OpenServer\domains\MyVK\avatars\<?php echo $profile['avatar']?>" style="width:200px;height:200px;border-radius:0%;"></avatar>
<?php
require_once "profile_functions/function1.php";
getprofile($_GET["id"]);
$profile = getprofile($_GET["id"]);
if ($profile['name']!="" and $profile['surname']!=""){
$title = $profile['name']." ".$profile['surname'];
} else{
$title = "Unidentified";
}
?>
<?php
function getprofile($id){
$mysql = new mysqli('myvk','root','D2/uT[-JXhG@QhJN','logins');
$where = "WHERE `id` =".$id;
$result = $mysql->query("SELECT * FROM `logins_from_people` $where ");
$user = $result->fetch_assoc();
$name = $user['name'];
$surname = $user['surname'];
$avatar = $user['avatar'];
$favorite_book= $user['favorite_book'];
if($favorite_book == null){
$favorite_book = "Информация не указана!";
}
$favorite_games= $user['favorite_games'];
if($favorite_games == null){
$favorite_games = "Информация не указана!";
}
$favorite_films= $user['favorite_films'];
if($favorite_films == null){
$favorite_films = "Информация не указана!";
}
$family_status = $user['family_status'];
if($family_status == null){
$family_status = "Информация не указана!";
}
$place_of_residence = $user['place_of_residence'];
if($place_of_residence == null){
$place_of_residence = "Информация не указана!";
}
if($avatar == null){
$avatar = "NULL.png";
}
$description = $user['description'];
if($description == null){
$description="Пользователь ничего не оставил здесь.";
}
$favorite_meals=$user['favorite_meals'];
if($favorite_meals == null){
$favorite_meals="Информация не указана!";
}
$favorite_color=$user['favorite_color'];
if($favorite_color == null){
$favorite_color="Информация не указана!";
}
$attitude_to_smocking=$user['$attitude_to_smocking'];
if($attitude_to_smocking == null){
$attitude_to_smocking = "Информация не указана!";
}
$attitude_to_alcohol=$user['$attitude_to_alcohol'];
if($attitude_to_alcohol == null){
$attitude_to_alcohol = "Информация не указана!";
}
$attitude_to_sport=$user['$attitude_to_sport'];
if($attitude_to_sport == null){
$attitude_to_sport = "Информация не указана!";
}
$dreams=$user['dreams'];
if($dreams == null){
$dreams = "Информация не указана!";
}
$Years_old = $user['Years_old'];
$data = array(
'name' => $name,
'surname' => $surname,
'avatar' => $avatar,
'description' => $description,
'Years_old' => $Years_old,
'favorite_book' => $favorite_book,
'favorite_games'=> $favorite_games,
'favorite_films' => $favorite_films,
'family_status' => $family_status,
'place_of_residence' =>$place_of_residence,
'favorite_color' =>$favorite_color,
'favorite_meals' =>$favorite_meals,
'attitude_to_smocking' => $attitude_to_smocking,
'attitude_to_alcohol' =>$attitude_to_alcohol,
'attitude_to_sport' =>$attitude_to_sport,
'dreams' =>$dreams
);
return $data;
}
?>
if a == "пеперони":
"""Здесь помести свой код"""
elif a == "4 сыра":
"""Здесь помести свой код"""
if c == 25:
"""Здесь помести свой код"""
elif c == 33:
"""Здесь помести свой код"""
elif c == 44:
"""Здесь помести свой код"""