How to random sign like that ?
echo Rand(|,★,●,-);
When i test this code it's will show error
Parse error: syntax error, unexpected '|', expecting ')'
How to random sign like that ?
echo Rand(|,★,●,-);
When i test this code it's will show error
Parse error: syntax error, unexpected '|', expecting ')'
You could store the signs in an array and use array_rand()
to select a random item:
$signs = array('|', '★', '●', '-');
$random = $signs[array_rand($signs)];
echo $random;