Black Snow
03-14-2013, 09:15 PM
Hi,
Can anyone tell me why this won't work? It's for creating rainbow usernames but for some reason it doesn't work.
if( strpos( $user['musername'], 'rainbow: true;' ) !== false )
{
$i = $b = 0;
$username = '';
$colours = array('d31539', 'ff7e00', 'ffc20e', '90d125', '187acb', '6f3198', 'ab1d8e');
while( $i < strlen( $user['username'] ) )
{
if( $b > ( count( $colours ) - 1 ) ) $b = 0;
$username .= '<span style="color: #' . $colours[ $b ] . '">' . $user['username'][$i] . '</span>';
++$b;
++$i;
}
$user['musername'] = '<strong>' . $username . '</strong>';
I also made the usergroup HTML markup to:
<strong style="color: #FFBC58; rainbow: true;">
</strong>
Can anyone tell me why this won't work? It's for creating rainbow usernames but for some reason it doesn't work.
if( strpos( $user['musername'], 'rainbow: true;' ) !== false )
{
$i = $b = 0;
$username = '';
$colours = array('d31539', 'ff7e00', 'ffc20e', '90d125', '187acb', '6f3198', 'ab1d8e');
while( $i < strlen( $user['username'] ) )
{
if( $b > ( count( $colours ) - 1 ) ) $b = 0;
$username .= '<span style="color: #' . $colours[ $b ] . '">' . $user['username'][$i] . '</span>';
++$b;
++$i;
}
$user['musername'] = '<strong>' . $username . '</strong>';
I also made the usergroup HTML markup to:
<strong style="color: #FFBC58; rainbow: true;">
</strong>