<?php
$dsn = 'mysql:host=localhost; dbname=id14206595_reg';
$pdo = new PDO($dsn, 'id14206595_lotvw','k~~^RlBz[7!7Sr~6');
$owner = $_SESSION['id'];
echo '<ul>';
$query = $pdo->query("SELECT * FROM `usertable1` WHERE `owner`='$owner'");
while($row = $query->fetch(PDO::FETCH_OBJ)) {
echo '<li><a href="/tables/new.php"><div class="box1"><h1>'.$row->title.'</h1><hr><p>Открыть <i class="fas fa-door-open"></i></p></div></a></li>';
}
echo '</ul>';
?>
"SELECT * FROM `usertable1` WHERE `owner`='$owner'"
load_theme_textdomain( 'theme-name', get_template_directory() . '/languages' );
/* Берем контент файла */
$xmlString = file_get_contents($xmlFilePath);
// Преобразуем xml в массив
$xml = json_decode(
json_encode((array)simplexml_load_string($xmlString)), true
);
$data = array(
array(
"title" => "Another title",
"date" => "Fri, 17 Jun 2011 08:55:57 +0200"
),
array(
"title" => "My title",
"date" => "Mon, 16 Jun 2010 06:55:57 +0200"
)
);
function sortFunction( $a, $b ) {
return strtotime($a["date"]) - strtotime($b["date"]);
}
usort($data, "sortFunction");
var_dump($data);
<?php
$arr = json_decode(
json_encode((array) simplexml_load_string($xmlString)), true
);
print_r($arr);
index.php
, а параметры dispatch=discussion.view&thread_id=1
следует искать в %{QUERY_STRING} или %{THE_REQUEST}.RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} (?:^|&)dispatch=discussion\.view(?:$|&)
RewriteCond %{QUERY_STRING} (?:^|&)thread_id=(\d+)(?:$|&)
RewriteRule ^index\.php$ /reviews/%1/? [R=301,L]
RewriteRule ^reviews/(\d+)/$ /index.php?dispatch=discussion.view&thread_id=$1 [L]
$product->{"PICTURE"}
$product['PICTURE']
$b = new B();
class A {
protected $age = 5;
public function get() {
$this->age = 10;
}
}
class B extends A {
public function get() {
parent::get();
echo $this->age;
}
}
$obj = new B();
$obj->get(); // 10
(1.5625rem - 1rem) *