php brackets in string code example Example: add brackets to string php $withbrackets = '[' . $strName . ']';