@php function listSelect2($arr,$val1,$val2,$selected=false,$sel=false,$alt=false) { $seleccione=''; if($sel) $seleccione=''; $opt=false; foreach($arr as $key=>$val) { if(!empty($val[$val1])) { $opt.=''; } } if($opt&&$seleccione) $opt = $seleccione.$opt; return $opt; } function getEstadocivil($estciv=false) { $estadocivil = array(1 =>array("estcivil"=>"SOLTERO"), 2 =>array("estcivil"=>"CASADO"), 3 =>array("estcivil"=>"VIUDO"), 4 =>array("estcivil"=>"DIVORCIADO") );//print_r($estadocivil); $estadocivil = listSelect2($estadocivil,'estcivil','estcivil',$estciv,1); return $estadocivil; } @endphp @extends('layouts.PortalCcz.masterCcz2') @section('content')