View Single Post
Old 01-27-2013, 11:25 PM   PM User | #6
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
The first thing I would do would be to get rid of all this unnecessary repetition:

PHP Code:
(isset($friendRequestDecision[$requestorID]) && $friendRequestDecision[$requestorID] == '0'
You've checked this value already:

PHP Code:
$friendRequestDecision[$requestorID] = (isset($requesteeApproved) ? $requesteeApproved 0); 
Just assign this value to a temporary (shorter) variable for use within the loop:
PHP Code:
$decision $friendRequestDecision[$requestorID]; 
This will make the code much easier to read.

I would also use HEREDOCs to reduce the clutter:

PHP Code:
$an_input = <<< HEREDOC
<input id='Requestor{$requestorID}{$ID}' name='{$requestorID}' type='radio' 
etc.. >
HEREDOC;

// then later 
echo $an_input
And, yes, put whatever you need on the page initially to help you test and debug it

Added: I know that I haven't answered your previous question directly but.. if you make these changes it will make it much easier for you (everyone) to read and understand, and to discover what any issues are.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 01-27-2013 at 11:31 PM..
AndrewGSW is offline   Reply With Quote