why double brackets are used in a php string code example Example: add brackets to string php $withbrackets = '[' . $strName . ']';