If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

How to concatenate number at end of variable name

hey,

i want to concatenate and echo the variable having number at the end of it. like varA1 , varA2 , varA3 .. .... the number generated by rand() function;
I am using
<?php
$varA1 = "Loin";
$varA2 = "Duck";
$varA3 = "Apple;
$varA4 = "Tomato";

$num = rand(1, 4);

?>
Now i want to print variable value randomly as everytime webpage refresh