for some reason, the exact same code without the added "$i[id]" part is working somewhere else on my site, but this is just rediculously NOT working for what i have here:
function nimg($directory='.')
{return count(glob($directory."/item/".$i[id]."/*"));};
i tried this code when there was no item directory made yet and still when i did this:
echo nimg();
it outputted the number 1. which is right off the bat WRONG.
now i decided to mak the actual directory "item"
and $i[id] in this case equals the number: 55
now i made the directory inside the "item" directory called "55"
still echos 1 when there is obviously 0 images in there.
i added an image. still echod 1.
then i added a 2nd image.
the darn thing still echos "1"
help me please.
just for references..
the directory the code is coming from is:
http://www.mysite.com/purchase/item.php
the directory it needs to count images in(int this case):
http://www.mysite.com/purchase/item/55/
???