I have a template file used in a store, and adding this code adds a page viewable for that particular record (item)
I was wondering if there was a way to get the $record_number/s and their corresponding pages in an array... that way I can reference them in a single line of code, rather than adding a new string for each one.....
I'm finding that I have a lot of records (over 200+) , so writing this string for each one is cumbersome:
elseif ($record_number == 416) {
include 'yadayada.php';
}
Code:
<?php
if ($record_number == 415) {
include 'blah.php';
}
elseif ($record_number == 416) {
include 'yadayada.php';
}
elseif ($record_number == 417) {
include 'whoohoo.php';
}
?>
I was wondering if there was a way to get the $record_number/s and their corresponding pages in an array... that way I can reference them in a single line of code, rather than adding a new string for each one.....
I'm finding that I have a lot of records (over 200+) , so writing this string for each one is cumbersome:
elseif ($record_number == 416) {
include 'yadayada.php';
}