<?php
$number = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "Всего {$number} дней в Августе 2003 года";
?>
private void button1_Click(object sender, EventArgs e)
{
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\Notepad.exe");
info.UseShellExecute = true;
info.Verb = "runas";
Process.Start(info);
}
private void button1_Click(object sender, EventArgs e)
{
const int ERROR_CANCELLED = 1223; //The operation was canceled by the user.
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\Notepad.exe");
info.UseShellExecute = true;
info.Verb = "runas";
try
{
Process.Start(info);
}
catch (Win32Exception ex)
{
if (ex.NativeErrorCode == ERROR_CANCELLED)
MessageBox.Show("Why you no select Yes?");
else
throw;
}
}
$className->$methodName();
$className->{"methodName"}();
return [
'news_per_page' => 10
]
config('cms.news_per_page');
class Recipe extends Model
{
public function tag_links()
{
return $this->hasMany('Recipe_Tag', 'recipe_id');
}
}
class Recipe_Tag extends Model
{
public function tag()
{
return $this->hasOne('Tag', 'tag_id');
}
}
class Tag extends Model
{
}
$receipes = Recipe::with('tag_links')->get();
foreach ($receipes as $receipe)
{
echo '<h1>'.$receipe->title.'</h1>';
echo 'Категории: ';
foreach ($receipe->tag_links as $tag_link)
{
echo $tag_link->tag->name;
}
}
foreach ( $items as $item ) {
echo <<<HTML
<tr>
<td><span>{$item->number}</span></td>
<td><span>{$item->name}</span></td>
<td><a href="{$item->link}" target="_blank"><span>Открыть</span></a></td>
</tr>
HTML;
}
$chars = [
'Ђ',
'Рњ',
'Р°',
'Рµ',
'Рџ',
'Р№',
'СЏ',
'Р‘',
'Рђ',
'Р»',
'Рї',
'С€',
'¶',
'Р”',
'‡',
'Р›',
'Р•',
];
Route::get('foo', function(){
return Redirect::to('/bar', 303);
});