It's a lot less confusing when indented properly. As for your braces, that's even more confusing, because it's still flat and you've put your braces in a configuration that doesn't make sense to anybody :-\
It's a lot less confusing when indented properly. As for your braces, that's even more confusing, because it's still flat and you've put your braces in a configuration that doesn't make sense to anybody :-\
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Yes I have already changed it to:
However, I have come across another problem going back a few steps.PHP Code:$temp = array();
foreach($id as $k => $v)
{
for($i = 0; $i < $qty[$k]; ++$i)
{
$temp[] = $v;
}
}
$cart = "array ('". implode("','",$temp)."')";
I initially created this $id array from a form that sends all the values from a hidden input field e.g.
Because the form uses $_GET, it adds each value to the url.HTML Code:<input type="hidden" name="id[]" value="$variable" />
However if I have say 200 values to get, it cuts the array off early. probably because the url if far too long.
Is there any way around this?
Use POST.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
already tried that but it didn't work! thought it was something to do with the way the form values set the array.
Got it to work now though.
Thanks for all the effort!![]()
Bookmarks