Can I do this?
Posted: Mon Jul 03, 2006 9:38 pm
I have a MYSQL table with 11 entries id's (1 -11).
In my php script I have to use the Eval () on four of those eleven entries.
So I'm using this:
This just repeats the content - one as it should be displayed and one as the code.
I need some way of doing this:
This gets me errors. How can I define this list of numbers and use the elseif statement?
Thanks,
David
In my php script I have to use the Eval () on four of those eleven entries.
So I'm using this:
Code: Select all
if ($file == "1") {
Eval ($content);
} else {
echo "$content";
}I need some way of doing this:
Code: Select all
$list = (1, 4, 6, ; // the id numbers that need to use Eval()
if ($file == "$list") {
Eval($content);
} elseif ($file != "$list") {
echo "$content";
}Code: Select all
$list = (1, 4, 6, ;Thanks,
David