我正在使用 Wowonder 脚本社交网络,我想在我的个人资料设置中添加未指定的性别,但它在我的页面上显示错误。
<?php
$gender = ucfirst(strtolower($wo['user_profile']['gender'])); echo ($gender == 'Male') ? $wo['lang']['male'] : $wo['lang']['female'] : $wo['lang']['unspecified'];
?>
谢谢
最佳答案
这里我将其作为答案发布:
echo ($gender == 'Male') ? $wo['lang']['male'] : (($gender == 'Female') ? $wo['lang']['female'] : $wo['lang']['unspecified']);
关于php - 在 Wowonder 中添加新的性别资料信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45431320/