Skip to main content
added 122 characters in body
Source Link
fmsthird
  • 4.6k
  • 4
  • 18
  • 42

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Using foreach loop

foreach($arr as $detail){ setTemplateVars(['details'=> $detail["key1"]);}

<?php foreach($arr$details as $detail){ : ?> setTemplateVars(['details'=> <p>{{trans ' %val' val = $detail["key1"]); }}</p> <?php endforeach; ?> 

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Using foreach loop

foreach($arr as $detail){ setTemplateVars(['details'=> $detail["key1"]); } 

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Using foreach loop

foreach($arr as $detail){ setTemplateVars(['details'=> $detail["key1"]);}

<?php foreach($details as $detail) : ?>  <p>{{trans ' %val' val = $detail["key1"]}}</p> <?php endforeach; ?> 
added 131 characters in body
Source Link
fmsthird
  • 4.6k
  • 4
  • 18
  • 42

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Using foreach loop

foreach($arr as $detail){ setTemplateVars(['details'=> $detail["key1"]); } 

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1 

Using foreach loop

foreach($arr as $detail){ setTemplateVars(['details'=> $detail["key1"]); } 
Source Link
fmsthird
  • 4.6k
  • 4
  • 18
  • 42

Providing you an static way to get the specific value of array key. You can pass it like this:

setTemplateVars(['details' => $arr[0]->key1]) //get key1 value from array 0 setTemplateVars(['details' => $arr[1]->key1]) //get key1 value from array 1