I guess I don't understand your code after all. It's supposed to go on the includED file, right? So I would link to the include as before...
Code:
require($BaseINC."/2B/inc/D/Content/Child/DB/RefGS/PlanimalsCode.php");
...then I would put your code in PlanimalsCode.php, where it would function in lieu of a PHP switch, right?
I get this error:
Cannot redeclare sup() (previously declared
But I don't know how to implement your code correctly. This is obviously not right:
Code:
function sup($MyURL,$Symbol) {
switch($Symbol)
{
case 'bobwhite':
case 'turkey':
$Desig = '<span style="padding: 2px; background: #900; color: #fff;"><sup>G</sup></span>';
break;
case 'peregrine falcon':
$Desig = '<span style="padding: 2px; background: #f00; color: #fff;"><sup>R</sup></span>';
break;
case 'wood duck':
$Desig = '<span style="padding: 2px; background: #00f; color: #fff;"><sup>W</sup></span>';
break;
case 'Kirtland’s warbler':
$Desig = '<span style="padding: 2px; background: #f66;"><sup>B</sup></span>';
break;
case 'mourning dove':
$Desig = '<span style="padding: 2px; background: #0ff;"><sup>S</sup></span>';
break;
default:
$Desig = '';
break;
}
switch($IDArea)
{
case 'us-de':
case 'us-ri':
case 'us-sd':
$TRStyle = ' class="linkDark" style="background: #060; color: #fff;"';
break;
case 'us-wy':
$TDStyle = ' style="border-bottom: none;"';
break;
default:
$TRStyle = '';
break;
}
}
But if I replace $MyURL with the actual value, I get this...
Code:
function sup(State_Birds,$Symbol)
...which can't work, either.
Thanks.
Bookmarks