Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
親変数をそれ自体の内部で言い換える代わりに($username)、それを行う他の方法はありますか?
$username
$username = ($profile_is_admin == true) ? $username . $admin_symbol : $username;
if ($profile_is_admin) { $username .= $admin_symbol; }
これを試して?
$username .= ($profile_is_admin) ? $admin_symbol : '';
このような
$username .= ($profile_is_admin == true) ? $admin_symbol : '';