Quote:
Originally posted by MUG
You can't use quotes when dealing with arrays in double-quotes. Try:
PHP Code:
if (substr($target, -1) != '/') $target .= "/$manufacturers_data[manufacturers_directory]";
|
Wouldn't that affect my variable in the first place? Because my variable is:
PHP Code:
$manufacturers_data['manufacturers_directory']
where i have specified earlier that:
PHP Code:
$manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name, manufacturers_directory from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
'text' => $manufacturers['manufacturers_name']);
}
// Directory Code Hack
$manufacturers_data = tep_db_fetch_array($manufacturers_query);
// Directory Code Hack
Edited: your suggestion works MUG, but I wonder if it affects my variable...