php if语句问题!

2025-06-22 10:50:20
推荐回答(3个)
回答1:

$s = @$_GET['s'];
$url = @$_GET['url'];
$i = 1;
$ss = array('1','2','3');
foreach ($ss as $v){ 
    if($v==$s)break;
    $i++;
}
if($i<=count($ss) && !empty($url)){
    echo 'alink'.$i.'';
}
else if(empty($s) && !empty($url)){
    header('Location: '.$url.'');
}
else{
    echo '呵呵';
}

回答2:

model' => $model, // Your model
attribute' => 'news_date', // Attribute for input
options' => array(
dateFormat' => 'yy-mm-dd',
changeYear'=> 'true',
changeMonth'=> 'true',
yearRange'=> '1900:2099',
showOn' => 'both',
buttonText' => 'Click',
)

回答3:

看了3遍实在是不知道你想表达什么~