Below is a sample text string ... $test = "This is {just a small} sample text. This can actually be {very long} but in {this case it is short}."; I need to get the text inside the { } into an array: The string length is not fixed and it can be hundreds of { } in another sample... Expected result: $arr[0] = "just a small"; $arr[1] = "very long"; $arr[2] = "this case it is short"; Any idea how to do this in a fast and effectiv way ?