add brackets to string php

PHP
$withbrackets = '[' . $strName . ']';

Source

Also in PHP: