Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá,
Tenho esse código e quero gravar o valor da variável $temp_Id para imprimir na tela do usuário o $temp_id escolhido, como posso fazer isso?
$locais = $result['DestinationList']['diffgram']['DestinationList']['Destination'];
>
foreach($locais as $key=>$val)
{
//$temp_string = utf8_encode($locais[$key]['!City']);
$temp_string = $locais[$key]['!City'];
$temp_string2 = substr($temp_string, 0, strlen($searchq));
$temp_string3 = utf8_encode($searchq);
$temp_Id = $locais[$key]['!Id'];
$temp_State = $locais[$key]['!State'];
$temp_Country = $locais[$key]['!Country'];
//$pos = strpos($temp_string2, $searchq);$temp_string = ucfirst(strtolower($temp_string));
$temp_string = ucwords ( $temp_string );
$temp_Country = ucfirst(strtolower($temp_Country));
$temp_Country = ucwords ( $temp_Country );
echo "<li>".$temp_string.", ".$temp_State.", ".$temp_Country.", ".$temp_Id."</li>";
}Carregando comentários...