我有这个代码,但没有工作,我不知道为什么...
function link_next($local_id, $link_type) {
if ( !is_numeric($local_id) ) die();
elseif ($link_type = 'a-href') { $something = 'a-href'; }
elseif ($link_type = 'link-rel') { $something = 'link-rel'; }
else { $something = 'blablabla'; }
return $local_id.'-'.$something;
}
$id ='14678';
echo link_next($id, 'link-rel');
Run Code Online (Sandbox Code Playgroud)
//编辑
该功能始终显示14678-a-href