Не выводится название фильмов на русском языке урок 62-63, в чем дело?

0
<?php

	function insert($name, $desk, $year, $rating, $poster, $category_id) {
		$mysqli = new mysqli('localhost', 'root', '', 'kinomonster');

		if(mysqli_connect_errno()) {
			printf('Соединение не установлено');
			exit();
		}

		$mysqli->set_charset('utf8');
		$quary = "INSERT INTO movie VALUES(null, '$name', '$desk', '$year', '$rating', '$poster', Now(), '$category_id')";
		$result = false;
		if($mysqli->quary($quary)) {
			$result = true;
		}

		return $result;
	}

	


	
	$xml = simplexml_load_file("xml/movies.xml") or die("Error: Cannot create object");

	//echo count($xml);

	foreach ($xml as $movie_key => $movie) {
		echo $movie->title-russian.'<br>';

		foreach ($movie->poster->big->attributes() as $poster_key => $value) {
			echo $poster.'<br>';
		}
	}

	echo "<pre>";
	print_r($xml);
	echo "</pre>";

?>






​
<?php

	function insert($name, $desk, $year, $rating, $poster, $category_id) {
		$mysqli = new mysqli('localhost', 'root', '', 'kinomonster');

		if(mysqli_connect_errno()) {
			printf('Соединение не установлено');
			exit();
		}

		$mysqli->set_charset('utf8');
		$quary = "INSERT INTO movie VALUES(null, '$name', '$desk', '$year', '$rating', '$poster', Now(), '$category_id')";
		$result = false;
		if($mysqli->quary($quary)) {
			$result = true;
		}

		return $result;
	}

	


	
	$xml = simplexml_load_file("xml/movies.xml") or die("Error: Cannot create object");

	//echo count($xml);

	foreach ($xml as $movie_key => $movie) {
		echo $movie->title-russian.'<br>';

		foreach ($movie->poster->big->attributes() as $poster_key => $value) {
			echo $poster.'<br>';
		}
	}

	echo "<pre>";
	print_r($xml);
	echo "</pre>";

?>






php
mysql

1 ответов

0

Нашел ошибку.

Sign up or Log in to write an answer