$sql = file_get_contents('name.sql');
$db->exec($sql);
const double pi = 3.14159265358979323846;
std::cout << whatever * pi << endl;
std::cout << whatever * 3.14159265358979323846 << endl;
$date = new DateTime('Wed, 01 Mar 2017 11:28:33 +0000');
var_dump($date->format('d.m.Y'));
string '01.03.2017' (length=10)
<?php
$resources = explode(',', $resources);
if (in_array($modx->resource->get('id'), $resources)) {
return 'block of code';
}
[[!ShowBlockFor? &resources=`1,2,3,5,10`]]
$query = http_build_query($params);
$query = preg_replace('/%5B[0-9]+%5D/simU', '%5B%5D', $query);
$url = $url . '?' . $query;
import random
def rand():
a = random.randint(1,2)
while (a != 2):
a = rand()
return a