In a select option, another data appears

0

Hello good afternoon friends I would like that in a select option it could be shown next to the cedula and the name two data in an option for the moment I have this code

$html .= "<option value='".$row['cedula']."'>".$row['cedula']."</option>";

something like that but that appears in my select option I would like to implant the name

    
asked by JSACTM Music 26.09.2018 в 23:38
source

1 answer

1

If you already get the name just concatenate it like this:

$html .= "<option value='".$row['cedula']."'>".$row['cedula']." | ".$row['nombre']."</option>";

assuming that $row['nombre'] you already get it.

    
answered by 26.09.2018 / 23:47
source