Quote:
Originally Posted by lizciz
Your loop doesn't really make sense. You aren't using the $idx and $val variables, so the loop will just do the exact same operation every time. You're probably trying to do something like this?
PHP Code:
$result['txt'] = $params['url1']; foreach ($keys as $id => $val) { $result['txt'] .= 'id' . $id . '=' . $val . '&'; } // Trim off the last & rtrim($result['txt'], '&');
|
YES!!!!!! this is what i was looking for thank you soo much!!!! yes this was my first time using loops but this works great i just had to do a little modification to it. your code output this:
pdf_folder/page_print.php?id0=Array&id1=Array&
i didnt write the script on the page so i'm not so sure how it works but i know for each $keys[] it holds each row's value so i just need my id value ie. if i need the id they selected i would refer to it like this $val['case_#'] if i need it the first name i would do this $val['first_name'] and so on...
so i modified the code like this
PHP Code:
$result['txt'] = $params['url1']; foreach ($keys as $id => $val) { $result['txt'] .= 'id' . $id . '=' . $val['case_#'] . '&'; } // Trim off the last & $fresult = rtrim($result['txt'], '&'); $result['txt'] = $fresult;
Thanks for your help greatly appreciate it!! 
Last edited by stivens; 06-15-2011 at 02:18 PM..
|