Flybersite wrote:Hi,
Yesterday a friend told me to : "in the header include or common.php, get all of the config values and add them to an array"
I have the following data on my screen:
| icfs_config_name | icfs_config_value |
| forum_name | Your forum title |
| forum_slogan | your slogan for your forum |
I need to echo the config_values into my script .
But I have absolutely no idea how to do this. Can someone tell me how?
I've done the following:
$configuration_query = mysql_query('SELECT * FROM icfs_config');
while($row = mysql_fetch_array($configuration_query))
{
$config = array('forum_name' => $row['icfs_config_value']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
<?php echo $config['forum_name']; ?>
</title>
</head>
<body>
But now I get the second value instead of the first one as first value. How do I have to get the first value?