$input = [
[
'title' => 'Чтение',
'value' => 'да',
],
[
'title' => 'Тип',
'value' => 'общий',
],
[
'title' => 'Чтение',
'value' => 'нет',
],
[
'title' => 'Тип',
'value' => 'общий',
],
];
function get_unique_titles(array $input)
{
$tmp = [];
$result = [];
foreach ($input as $row) {
$tmp[$row['title']][] = $row['value'];
}
foreach ($tmp as $title => $values) {
if ($values == array_unique($values)) {
$result[] = $title;
}
}
return $result;
}
var_dump(get_unique_titles($input));
array(1) {
[0] =>
string(12) "Чтение"
}
containerWrap = document.getElementById("container");
var jQueryMinJs = document.createElement("script");
jQueryMinJs.onload = loadOtherScripts;
jQueryMinJs.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
containerWrap.appendChild(jQueryMinJs);
function loadOtherScripts() {
$.getScript('js/script__.js', function () {
console.log('script__.js loaded');
});
}
<select ng-options="k as v for (k, v) in words">
<option value="">Choose word</option>
</select>
php > echo "is_auth = " . false . ";\r\n";
is_auth = ;
php > echo "is_auth = " . json_encode(false) . ";\r\n";
is_auth = false;
A boolean TRUE value is converted to the string "1". Boolean FALSE is converted to "" (the empty string). This allows conversion back and forth between boolean and string values.
INSERT INTO sometable VALUES (1, 2);
SELECT * FROM othertable WHERE uid = LAST_INSERT_ID();
passthru('ffmpeg -i /home/dokuro/vedeos/60fps_FREELY_TOMORROW_-_Hatsune_Miku.mp4', $response);