My question is I don't see why it won't actually work?I am also new to php so I am learning this PHP. I do not know why it is an unexpected T_VARIABLE and I'm assuming it means " $ "
<?php
include('database.class.php');
$sql = new Database(NULL);
$ids = $sql->select('*', '`ids` ORDER BY `UserId` ASC', NULL, NULL, NULL, true, true);
$dump = array();
foreach($ids as $index=>$id);
$dump[] = $id['UserId'].' | REGLINK - http://xat.com/web_gear/chat/register.php?UserId='.$id['UserId'].'&k2='.$id['k2'].'&mode=1'
$DumpFile= 'ids.txt';
if(file_exists($DumpFile)) {
unlink($DumpFile);
}
file_put_contents($DumpFile, implode("\r\n", $dump));
die(count($dump).' ids were dumped into the list.'."\n");
?>