php how to get content inside of curly brackets in a paragraph and store value code example Example: add brackets to string php $withbrackets = '[' . $strName . ']';