$a_links = $html->find('.content')->innertext;
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
}
$(document).ready(function(){
var tovarIndex = getURLParameter('tovar');
if (tovarIndex) {
$("#tovary").find("tr").eq(tovarIndex).addClass("select_tovar");
}
});
$cnt = 0;
foreach($scoolChild as $iname => $height)
{
if ($height > 173)
$cnt++;
}
$scoolChild_filtered = array_filter($scoolChild, function($item){
return $item > 173;
});
<div class="form-group">
<label for="game" class="col-sm-3 control-label">Игра:</label>
<div class="col-sm-4">
<select class="form-control" id="gameid" name="gameid" onChange="updateForm()">
<?php foreach($games as $item): ?>
<?php if ($item['game_id'] == 1): ?>
<option value="<?php echo $item['game_id'] ?>"><?php echo $item['game_name'] ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
</div>
<?php
function aprint($a)
{
print "<pre>";
print_r($a);
print "</pre>";
}
$wall = file_get_contents("http://api.vk.com/method/wall.get?v=5.3&filter=others&domain=id105297973&count=10");
$wall = json_decode($wall);
$wall = $wall->response->items;
$data = [];
foreach($wall as $w)
{
if (isset($w->attachments))
{
foreach ($w->attachments as $attach)
{
if ($attach->type === "photo")
{
$data[] = $attach->photo;
//здесь можно и записывать что-то в бд
}
}
}
}
aprint($data);
?>