Framework: single and double quotation marks in printing variable value in blade

Created on 4 Feb 2017  路  4Comments  路  Source: laravel/framework

  • Laravel Version: 4.2.19
  • PHP Version: 5.5.9-1
  • Database Driver & Version: MySQL v5.5.49

Description:

the single quotation dosnt act same as double quotation when trying to print a value stored in defined variable.

Steps To Reproduce:

assume:

{{ Form::text('name_fr$id', null, array('class' => 'form-control')) }}
this will not print the value in $id
BUT:
{{ Form::text("name_fr$id", null, array('class' => 'form-control')) }}
will work just fine.

Most helpful comment

All 4 comments

Then why not use double quotes?

("name_fr {$id}")

It's a standard PHP behavior.

thank you guys, much appreciated

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shopblocks picture shopblocks  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

JamborJan picture JamborJan  路  3Comments

jackmu95 picture jackmu95  路  3Comments

YannPl picture YannPl  路  3Comments