I have a hack that has a variable defined as $e, and through the URL, $e is set to a number like 404. (Yeah, it's the Custom HTTP Error Pages hack.

)
The variable works fine for the rest of the script. There's no problem with the variable.
I'm trying to add phrases to the hack. I have created a bunch of phrases named error_title_400, error_title_401, error_title_403, etc., for all the HTTP error types.
One way for me to call the phrase would be through a long if...else statement, like:
Code:
if ($e == 400)
{
$errortitle = $vbphrase['error_title_400'];
}
else if ($e == 401)
{
$errortitle = $vbphrase['error_title_401'];
}
else ...
And so on and so on, for each HTTP error type.
But I thought a better way would be to simply make part of the phrase name variable, since the last part of the name is the same as an existing variable. I thought I could use something like:
Code:
$errortitle = $vbphrase['error_title_' . $e];
But that doesn't work. With this, the phrase never gets called.
I've also tried:
Code:
$errortitle = $vbphrase['error_title_$e'];
and that didn't work, and I also tried using the construct_phrase() function, and that didn't help.
Any ideas?
################################
Please disregard this question. I'm such an idiot.
For the record, the code
Code:
$errortitle = $vbphrase['error_title_' . $e];
does in fact work.
The problem was that I made these phrases as part of a new phrase group, and I did not tell the script to include that phrase group.