这样的PHP代码你会写么?

2025-04-13 00:46:08
推荐回答(1个)
回答1:

function stringForJavascript($in_string) {
$str = ereg_replace("[\r\n]", " \\n\\\n", $in_string);
$str = ereg_replace('"', '\\"', $str);
Return $str;
}
switch($_GET['id']) {
case 'tab1':
$box = 'This is content for tab 1.';
?>



$bookmark){ ?>

post_title; ?> bookmark_ID); } ?>



echo $pagestr;?>


没有收藏


或者你还没有 登陆?如果你还没有账户,欢迎 注册 成为我们的会员。







break;
case 'tab2':
$box = 'This is content for tab 2.';
break;
case 'tab3':
$box = 'This is content for tab 3.';
break;
case 'tab4':
$box = 'This is content for tab 4.';
break;
case 'tab5':
$box = 'This is content for tab 5.';
break;
default:
$box = 'There was an error.';
break;

}
print stringForJavascript($box);
usleep(400000);
?>