$yourArr = [];
usort($yourArr, function ($a, $b) {
return $a[0] < $b[0] ? -1 : 1;
});
public function manageAction()
{
// ...
$ret = $this->fillForm();
if ($ret instanceof Response) {
return $ret;
}
// ...
}
SELECT
CASE
WHEN percent IS NOT NULL THEN price * percent / 100
ELSE price
END as price
FROM tarifs
$db->query('SELECT * FROM `databaseA`.`table`');
class foo {
public function __construct() {
echo 'foo', PHP_EOL;
}
}
class bar extends foo {
public function __construct() {
echo 'bar', PHP_EOL;
}
}
$bar = new bar(); // выведет: bar
class foo {
public function __construct() {
echo 'foo', PHP_EOL;
}
}
class bar extends foo {
public function __construct() {
parent::__construct();
echo 'bar', PHP_EOL;
}
}
$bar = new bar();
//выведет:
foo
bar
ALTER TABLE tbl_1 DROP CONSTRAINT tbl_1_pkey CASCADE;
$renderImage = CFile::ResizeImageGet(
$arResult['PREVIEW_PICTURE'],
array("width" => 60, "height" => 60)
);