LethalJ
05-07-2015, 11:15 AM
Heya guys, hoping someone can help me with this. Basically we want to add two toned donator to forum as shown below.
https://vborg.vbsupport.ru/external/2015/05/23.png
I'm using the following code to achieve this
if( strpos( $user['musername'], 'tone: true;' ) !== false )
{
$i = $b = 0;
$username = '';
$colours = array('009B48','FF7900');
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>';
}
How could I seperate these colors eg Green first blending into the orange as shown below
https://vborg.vbsupport.ru/external/2015/05/24.png
Any help is greatly appreciated
https://vborg.vbsupport.ru/external/2015/05/23.png
I'm using the following code to achieve this
if( strpos( $user['musername'], 'tone: true;' ) !== false )
{
$i = $b = 0;
$username = '';
$colours = array('009B48','FF7900');
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>';
}
How could I seperate these colors eg Green first blending into the orange as shown below
https://vborg.vbsupport.ru/external/2015/05/24.png
Any help is greatly appreciated