Hi,
I am using the following code to creat a keyword array for years:
// years
$start_year = 1934;
$sql = 'SELECT YEAR(date) AS year FROM match_results ORDER BY date DESC LIMIT 1';
$result = $db->query($sql);
$numrows = $result->num_rows;
while ($row = $result->fetch_assoc()) {
$end_year = $row['year'];
}
for ($i=$end_year; $i>$start_year; $i--) {
$year = $i;
$keyword_array[$year] = 'main.php?page=year_results&year='.$year;
}
The problem is, I am using this keyword array in conjunction with an autolink class I got from PHP Classes and the keyword needs to be a string. I've searched the forums for an int to string thread and found a few, but they didn't seem to help. I tried:
$year = (string) $i;
$year = ''.$i.'';
but it's not working.
Basically, for example, I need it to be like this:
$keyword_array["1935"] =
Thanks for any help,
~Oni.