[php] PHP - syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

I am very new to PHP and have no idea why this is happening, I have looked at other online items, however I just cannot seem to see why I am getting this error.

<?php
include_once('assets/libs/posicloud/posicloud.php');

    $cloud=new posicloud();
    $out='';
    foreach ($cloud->list_templates() as $key=>$template)
    {
$out.='<option value=''.$key.'">'.$value["name"].';
    }
  return $out;
?>

Thankyou for any help!

This question is related to php

The answer is


You have a sintax error in your code:

try changing this line

$out.='<option value=''.$key.'">'.$value["name"].';

with

$out.='<option value="'.$key.'">'.$value["name"].'</option>';

Wrong quoting: (and missing option closing tag xd)

$out.='<option value="'.$key.'">'.$value["name"].'</option>';

'<option value=''.$key.'">'

should be

'<option value="'.$key.'">'

$out.='<option value="'.$key.'">'.$value["name"];

me funciono con esta

"<a  href='javascript:void(0)' onclick='cargar_datos_cliente(\"$row->DSC_EST\")' class='button micro asignar margin-none'>Editar</a>";