I would like to print random values in my page. I wrote this code but it is not working:
$claim[1] = "Red";
$claim[2] = "Blue";
$claim[3] = "Yellow";
$claim[4] = "Purple";
$claim[5] = "Magenta";
$color = $claim[mt_rand(1,2,3,4,5)];
Any idea?
mt_rand(1,2,3,4,5)? The manual clearly explains with what kind of parameters this function can be called, does it not? You mustn’t wonder that your stuff doesn’t work, when you go and invent your own bogus nonsense syntax.