Просмотр поста

.
galtsev.t
<?php exit;
# kantry (25.08.2022 / 23:59)
preg_match('~\[([^]]+)\]~', $str, $matches);var_dump($matches[0]);
Это так же дает массив 
array (size=2) 
 0 => string '[name]' (length=6)
  1 => string 'name' (length=4)