Array not loading up

Hi All.
What I am trying to build is a rack builder like I only have 32 ribbons.
So all works well. I am echoing out all the right number where I expect them to be
Now when I get to the array (echo "

my_Ribbons ".sizeof($my_Ribbons);// Last line) it will echo out 1/0. It should be 9 (or whatever $B is)

$my_Ribbons = array ();
for ($X = 1; $X <= 32; $X += 1){

if($row_rsRibbons[‘Ribbion’.$X]!=“0”) {
echo “”;
echo $row_rsRibbons[‘Ribbion’.$X];
$my_Ribbons[$X] = $B; //<-- Trying to Add $B into the array
echo $B;//<-- This echos out 1,2,3,…9 Correct

function DivideIT($B){
echo “
";//<-- This echos out correct
$C = $B/4;
echo “

C=”.$C;//2.25 <-- This echos out correct. this will be 2 rows of 4+1
echo "

my_Ribbons ".sizeof($my_Ribbons);//<-- this echos out 1/0. Should be whatever $B is


I answered to you here: Array not working

Sponsor our Newsletter | Privacy Policy | Terms of Service