Basic if else issue for active list items
-
Hi
I’m making a photo gallery plugin, but having troubles with the php syntax needed to make the first list item of the unordered list populate with an “active” class. Here is the code:// Start $count = 1; // Output each gallery item if ($count == 1) $output .= "<li class='active'>"; $count++; else { $output .= "<li>"; }
This is only a small part of the plugin code, but I keep getting a parse error:
Parse error: syntax error, unexpected T_ELSE inThoughts?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Basic if else issue for active list items’ is closed to new replies.