<textarea name="description" class="form-control" id="description"><?= $projectDescription ?></textarea>
<textarea>
и <?= $projectDescription ?>
как минимум есть символы переноса строки. $currentMonth = null;
foreach($models as $model){
$month = date('F', $model->created_at);
if($currentMonth <> $month){
echo $currentMonth = $month;
}
// вывод записи
}
public function getPortfolio(){
return $this->hasOne(Portfolio::className(), ['id' => 'id_serice']);
}
$sp->portfolio
$TagArt->where($db->quoteName('c.type') . ' IN (4, 8) AND ' . $db->quoteName('b.id') . ' IN (' . $LoadTagIrticle . ')');
echo json_encode([
'type' => 'FeatureCollection',
'features' => [
['type' => 'Feature'],
// ...
]
]);
function set_array_value(&$array, $key, $value){
if(!is_array($key)){
$key = explode('\\', $key);
}
$currentKey = array_shift($key);
if(!is_array($array[$currentKey])){
if(!isset($array[$currentKey])){
$array[$currentKey] = [];
} else {
$array[$currentKey] = [ $array[$currentKey]];
}
}
if(count($key) > 0){
set_array_value($array[$currentKey], $key, $value);
} else {
if(is_array($array[$currentKey])){
$array[$currentKey][] = $value;
} else {
$array[$currentKey] = [$array[$currentKey], $value];
}
}
}
function set_array_value(&$array, $key, $value){
if(!is_array($key)){
$key = explode('\\', $key);
}
$currentKey = array_shift($key);
if(!is_array($array[$currentKey])){
if(!isset($array[$currentKey])){
$array[$currentKey] = [];
} else {
$array[$currentKey] = [ $array[$currentKey]];
}
}
if(count($key) > 0){
set_array_value($array[$currentKey], $key, $value);
} else {
if(is_array($array[$currentKey])){
$array[$currentKey][] = $value;
} else {
$array[$currentKey] = [$array[$currentKey], $value];
}
}
}
$str = 'club123';
if(preg_match('~^(club|public)([\d]+)$~', $str, $matches)){
$numbers = $matches[2];
} else {
// ...
}