如何使用strlen()
根据字符串长度返回X星(*)?
<?PHP
$account_name = "account1"; // 8 characters
$account_name_length = strlen($account_name);
// This is what i want to achieve - convert `$account_name` string length into stars.
$account_name_hidden = "********"; // return 8 stars as string
?>
答案 0 :(得分:0)
<?php
$account_name = "account1" // 8 characters
$account_name_length = strlen($account_name);
$account_hidden = str_repeat('*', $account_name_length);
?>
答案 1 :(得分:0)
以这种方式:
.subul_main li.level1 { background: #ff8400; }