P
P
Pavel Gogolinsky2015-11-09 16:35:43
PHP
Pavel Gogolinsky, 2015-11-09 16:35:43

Is it worth putting a semicolon?

I display the value of the variable in the view.
<div><?= $title ?></div>
Should I put a semicolon after $title in this case or not? How are you doing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
entermix, 2015-11-09
@entermix

Is it worth putting a semicolon after $title in this case or not?

The main thing is to stick to a single style.
I bet it's become a habit :)

K
Konstantin B., 2015-11-09
@Kostik_1993

It's up to you to set it or not, but <?= should be replaced with <?php echo is clearly worth it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question