[eluser]Unknown[/eluser]
Hello,
I hear a lot of people banging on about how calling functions inside views is bad practice.
What if I had a foreach loop that echo'd out some data but wanted to call a function with some of that data. e.g
<?php foreach ($posts as $post) {
echo $post->title;
echo $post->content;
time_difference($post->timestamp);
}
?>
Notice the time_difference function? How would I do that without calling it in the function?