remember the number is a variable!! so i would have to first look for the $string... how can i do this when its not always going to be [Q/4471] it might have 505 or 92044 or 3205......
$string = '[Q/4471]';
$string = trim($string, '[]');
$explode = explode('/', $string);
$tables = array(
'Q' => 'quotes',
'R' => 'results'
);
$sql = 'SELECT * FROM ' . $tables[$explode[0]] . ' WHERE id = ' . $explode[1];