php trim a specific character from beginning of string code example Example: trim specific character from strin using php $widget_id = trim($widget_text,'[]')