I have a string of text that somewhere will contain the resolution to my vid in the format ###x### or ####x#### (ex. 320×240 or ex. 1024×1280 ex. 320×1024 etc.) or any combo in between. I am not great at regexes yet and I was wondering if anyone could point out where I am going wrong.
$res='some long string';
$search='/([0-9]{3-4})x([0-9]{3-4})/';
preg_match($search, $res, $matches);
$res1=$matches[1];
$res2=$matches[2];
It should be: