Есть цикл foreach. который выводит данные. Но если прописать print_r($art['place_of_location']); выводит почему то id последнего видео, почему?
$arr = '[{
"currentPos": 2,
"isSelected": false,
"text": 4
},
{
"currentPos": 1,
"isSelected": true,
"text": 3
},
{
"currentPos": 3,
"isSelected": true,
"text": 1
}
]';
$arr = json_decode($arr);
$result = true;
foreach ($arr as $val) {
if (!$val["isSelected"]) {
$result = false;
break;
}
}
var a = [{
"currentPos": 2,
"isSelected": true,
"text": 4
},
{
"currentPos": 1,
"isSelected": true,
"text": 3
},
{
"currentPos": 3,
"isSelected": true,
"text": 1
}
]
var b = a.every(function(item) {
return item.isSelected
})
console.log(b)
player.on('timeupdate', function() {
var currentTime = Math.round(this.currentTime());
var duration = Math.round(this.duration());
var percent = Math.round(currentTime / duration * 100);
var next_percent = $(this).data('next-percent');
if (!next_percent) {
next_percent = 0;
}
if (percent >= next_percent) {
postVideoStatus(next_percent);
next_percent += 25;
$(this).data('next-percent', next_percent);
}
});
<template>
<div>
...
<template v-for="point in points" :key="point.id">
<point :point="point" @click="$emit('gotoOtherComponent')"></point>
</template>
</div>
</template>
<template>
<div id="app" class="go_section">
<start-screen @gotoOtherComponent="showOther=true" v-if="!showOther"></start-screen>
<other-screen v-if="showOther"></other-screen>
</div>
</template>
<map-point v-for="point in points" :key="point" :point="point"></map-point>
<map-point v-for="point in points" :key="point" v-bind="point"></map-point>
props['map_x', 'map_y']