you should try this:
<input class="form-control" type="text" id="nameEng" name="nameEng" value="{{!empty($tagTrans['en']) ? $tagTrans['en'] : ' ' }}" />
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all! I have this input:
<input class="form-control" type="text" id="nameEng" name="nameEng" value="{{$tagTrans['en']}}" />
And if the variable is empty I got this message:
Parse error: syntax error, unexpected ''); ?>">' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')'
If it isn't empty everything is perfect. Why?
Please or to participate in this conversation.