So I am wanting to do some simple math:
In this case add some numbers in an array:
<?php
$arr = array(1,2,3,4,5);
$sum = 0;
for ($i = 0; $i < count($arr); $i++)
$sum += $arr[$i];
print ($sum);
?>
This works fine. But when I try to get the array populated with EE data, no workie, i just get a blank page.
$arr = array({exp:weblog:entries weblog="rounds"}{rounds},{/exp:weblog:entries});
I can’t tell if you can have EE tags WITHIN php or not.
I then resorted to making a quick plugin. Again works with hard coded data:
{exp:simple_math:add}
1,2,3,4,5,
{/exp:simple_math:add}
However, it doesn’t work if there is a weblog entry inside that plugin tag.
{exp:simple_math:add}
{exp:weblog:entries weblog="rounds"}{rounds},{/exp:weblog:entries}
{/exp:simple_math:add}
Help!
