PShowcase
EN NL
04 / 20

Control flow

Loops and conditions are tags that sit on their own line.

.phlo
view tasks($items):
<ul>
<foreach $items AS $task>
	<li>
		$task->name
		<if $task->done>
			<span class="done">done</span>
		<else>
			<span>todo</span>
		</if>
	</li>
</foreach>
</ul>
  • Write a view done
  • Add a route done
  • Wire the apply() todo
  • Ship it todo