bassouma86
03-07-2004, 07:41 PM
hey there
i was trying 2 use the count() to get the length of an array.
it should be sth like variable = count(ArrayName);
but i have a problem with my IIS server that makes me access the array (an HTML list of options using sth like
foreach ( $_GET["products"] as $value )
so the count() should be variable = count($_GET["products"]);
Is this right or I'm i on the wrong track here ???
cause anyway it ain't workin' :mad:
btw the purpose 4 gettin' the length of my array of options is to know when the array is empty so that i could handle that case cause i have a script that runs like a charm when i choose one option or more but when i choose none it makes an error :confused:
so if there's a way around I'd appriciate it ;)
thx in advance & good night
i was trying 2 use the count() to get the length of an array.
it should be sth like variable = count(ArrayName);
but i have a problem with my IIS server that makes me access the array (an HTML list of options using sth like
foreach ( $_GET["products"] as $value )
so the count() should be variable = count($_GET["products"]);
Is this right or I'm i on the wrong track here ???
cause anyway it ain't workin' :mad:
btw the purpose 4 gettin' the length of my array of options is to know when the array is empty so that i could handle that case cause i have a script that runs like a charm when i choose one option or more but when i choose none it makes an error :confused:
so if there's a way around I'd appriciate it ;)
thx in advance & good night