<textarea name="description" class="form-control" id="description"><?= $projectDescription ?></textarea>
<textarea>
и <?= $projectDescription ?>
как минимум есть символы переноса строки. 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 {
// ...
}
$access1 = mysqli_query($db,"SELECT id_right FROM access WHERE id_role = '$_GET[id]'");
$_GET[id]
$_GET['id']
$ac = array();
$access1 = mysqli_query($db,"SELECT id_right FROM access WHERE id_role = '$_GET[id]'");
if($ass = mysqli_fetch_array($access1)){
do{
$ac[] = $ass['id_right'];
}while($ass = mysqli_fetch_array($access1));
}
<div class="checkbox"><label><input type="checkbox" name="dostup-3" value="on" <?php
echo ( in_array(1, $ac) ) ? 'checked' : '' ;
?> /> Доступ в административную панель</label></div>
<div class="checkbox"><label><input type="checkbox" name="dostup-1" value="on" <?php
echo ( in_array(2, $ac) ) ? 'checked' : '' ;
?> /> Добавление и редактирование заявок</label></div>
<div class="checkbox"><label><input type="checkbox" name="dostup-2" value="on" <?php
echo ( in_array(3, $ac) ) ? 'checked' : '' ;
?> /> Удаление заявок</label></div>
<div class="checkbox"><label><input type="checkbox" name="dostup-4" value="on" <?php
echo ( in_array(4, $ac) ) ? 'checked' : '' ;
?> /> Быстрое обслуживание</label></div>
<div class="checkbox"><label><input type="checkbox" name="dostup-5" value="on" /> Управление ролямя</label></div>