If(isset($accounts) && !empty($accounts)){
//some code here
}
function orderBy(array &$array, $sortOrder)
{
usort($array, function ($a, $b) use ($sortOrder) {
$result = '';
$sortOrderArray = explode(',', $sortOrder);
foreach ($sortOrderArray AS $item) {
$itemArray = explode(' ', trim($item));
$field = $itemArray[0];
$sort = !empty($itemArray[1]) ? $itemArray[1] : '';
$mix = [$a, $b];
if (!isset($mix[0][$field]) || !isset($mix[1][$field])) {
continue;
}
if (strtolower($sort) === 'desc') {
$mix = array_reverse($mix);
}
if (is_numeric($mix[0][$field]) && is_numeric($mix[1][$field])) {
$result .= ceil($mix[0][$field] - $mix[1][$field]);
} else {
$result .= strcasecmp($mix[0][$field], $mix[1][$field]);
}
}
return $result;
});
return $array;
}
if(!isset($_SESSION['session_id']){
session_start();
}
/*
Реализуем метод print
*/
public class Solution {
public static void main(String[] args) {
print("Java is easy to learn!");
print("Java is object-oriented!");
print("Java is platform-independent!");
}
public static void print(String s) {
//напишите тут ваш код
System.out.println(s);
System.out.println(s);
System.out.println(s);
System.out.println(s);
}
}
$(document).ready(function () {
$('[shape=poly]').click(function () { /*кликаем */
$(".hiden").not($("#text-" + $(this).attr("id"))).hide(); // скрываем
$("#text-" + $(this).attr("id")).toggle(); // показываем / скрываем
if ( $("#text-" + $(this).attr("id")).is(':visible') ) {
localStorage.setItem('show', "#text-" + $(this).attr("id"));
}else{
localStorage.setItem('show', "");
}
});
if(localStorage.getItem('show')) {
$(localStorage.getItem('show')).show();
}
});