What does it mean?
-
“I have code that works normally in a template but doesn’t work when in the widget?
Code in a template runs in the global context. Code in the widget will run in a function context. Make sure that you declare any global variables as global before attempting to use them”
What does that mean?
How do i configure the code below to work in the widget?<?php $lunch = get_group('lunch'); foreach($lunch as $lunch){ echo '<span class="lunch-dag">' . $lunch['lunch_dag'][1]. '</span><br />'; echo '<span class="lunch-matratt">' . $lunch['lunch_matratt'][1]."<br />"; echo $lunch['lunch_matratt'][2]."<br />"; echo $lunch['lunch_matratt'][3]."<br />"; echo $lunch['lunch_matratt'][4]. '</span><br /><br />';}?>
Best regards Andy
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘What does it mean?’ is closed to new replies.