ok d00d.
You query the server with..
"SELECT id FROM table;"
Then you use mysql_fetch_array() to grab all the results into an array(), this array now contains all your ID'S
example code...
$sql = "SELECT id FROM table;";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query));
{
echo $row['ID'];//depends on the name of the row in mysql
}
the script above will output all your IDS as you have stored them in SQL.
lets move on..
example code!
$sql = "SELECT id FROM table;";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query));
{
echo explode("-", $row['ID']);//depends on the name of the row in mysql
}
now it will display all your id's in the correct format you require... trust me try it, it will work!
let us know how you get on
hth
lozz