The Little Guy Posted November 3, 2007 Share Posted November 3, 2007 Why is this giving me a result of 0? <?php $uniqV = array_count_values($weekDay); $show = array(); $gvals = ''; foreach($weekDays as $day){ if(!in_array($day,$show)){ array_push($show,$day); $radCol = array_rand($chartColors); $gval = '<set name="'.$day.'" value="'.$uniqV[$day].'" color="'.$chartColors[$radCol].'" />'; } $gvals += $gval; } echo $gvals; ?> I echo out $gvals, and the value I get is 0 why? I am expecting some HTML. Quote Link to comment https://forums.phpfreaks.com/topic/75860-solved-wrong-output/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.