- parse_str: documentation ( source)
- parse_url: documentation ( source)
<?php
$str = 'component/content/article?id=9';
$query = parse_url($str, PHP_URL_QUERY); // Get the string part after the "?"
parse_str($query, $params);
print $params['id'];