I have content in this form
$content =\"This is a sample text where {123456} and {7894560} [\'These are samples\']{145789}\";
This is a sample text where {123456} and {7894560} [\'These are samples\']{145789}
Do like this...
This is a sample text where {123456} and {7894560} ['These are samples']{145789}"; preg_match_all('/{(.*?)}/', $content, $matches); print_r(array_map('intval',$matches[1]));
OUTPUT :
Array ( [0] => 123456 [1] => 7894560 [2] => 145789 )