What are the differences between "<%" and "<%="? How do you know which to use? I'm teaching myself and one of the tutorials I'm using listed the above symbol sets.
Asked
Active
Viewed 93 times
2 Answers
2
You must use <%= %> for instructions whose output you want to display in your view, and use <% %> otherwise.

Ed de Almeida
- 3,675
- 4
- 25
- 57
0
<%= %>
use to output something
<% %>
use to add your conditions for example