function parser($url){
$file = get_content($url);
$doc = phpQuery::newDocument($file);
foreach($doc->find('.flexitable .sectiontableentry') as $article){
$article = pq($article);
$url2 = $article->find('.table-titles a')->attr('href');
parser2($url2);
}
}
jQuery.ajax({
url: '/ServerSysdate.php',
async: false,
success: function (data) {
d = new Date(data);
}
});
$path= '..' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . $class . '.php';
$string = str_replace(array_keys($array), $array, $string);
function all_pages(){
$query = mysql_query("SELECT `pages_name` FROM pages");
$pages = array();
while ($row = mysql_fetch_assoc($result)) {
$pages[ ] = $row
}
return $pages;
};
<?php require_once "../includes/controller.php";?>
<?php
$pages = all_pages();
print_r($pages);
?>
<?php
$items = $link->spec();
usort ( $items , function($i1, $i2){ if ($i1->service->price == $i2->service->price) {return 0;} return ($i1->service->price < $i2->service->price) ? -1 : 1; } );
?>
<div class="services">
<?php foreach ($items as $item) { ?>
<div class="item">
<div class="s1"><?php echo $item->{$lang.'name'}; ?> <a href="javascript:void(0)" class="help ttip" title="<?php echo $item->page->{$lang.'anotation'}; ?>">?</a></div>
<div class="s2"><?php if ($item->service->period) { ?><?php echo $item->service->period; ?> <?php echo __('.'); ?><?php } else { ?> <?php } ?></div>
<div class="s3"><?php if ($item->service->price) { ?><?php echo $item->service->price; ?> <?php echo __(''); ?><?php } else { ?> <?php } ?></div>
</div>
<?php } ?>
</div>