0

I have an a string like this

$size = "facebook_page [600x315]";

I want to extract

600x315

I tried this

 preg_match('~[(.*?)]~', $size, $output);
 print_r($output[1]);

It doesn't give me any output. Where am I going wrong? If there's another method it'd help a lot.

Red Bottle
  • 2,839
  • 4
  • 22
  • 59

0 Answers0