Here is the query string.
$query = "SELECT t.id, t.assignee, t.owner, d.code, d.status, d.target_completion_date, d.target_extension_date, d.submission_date, d.approval_date, d.revision_start_date, d.revision_completion_date, d.message, ty.name, f.orig_name, f.new_name, b.payment_date, b.discount, b.total_cost, b.amount_payed, b.edit_level, b.billing_type, b.pages, b.words FROM tasks t INNER JOIN details d ON t.detail_id = d.id INNER JOIN billing b ON t.billing_id = b.id INNER JOIN TYPE ty ON d.document_type_id = ty.id INNER JOIN files f ON t.file_id = f.id WHERE t.assignee = 'argie1234'";
And this is an array to which I would like to receive the result of the request.
$user = array('allTask'=>array(array('taskid' => 1, 'assignee'=>'argie1234', 'owner'=>'austral1000', 'details' => array( 'code' => 'E', 'status'=>'TC', 'targetCompletionDateUTC'=>'1379401200', 'targetExtentionDateUTC'=>'1379401200', 'submissionDateUTC'=>'1379401200', 'approvalDateUTC'=>'1379401200', 'revisionStartDateUTC'=>'1379401200', 'revisionCompletionDateUTC'=>'1379401200', 'messageToEditor'=>'Please work on it asap.', 'documentType' => 'Thesis'), 'file' => array('orig_name' =>'originalname.docx', 'new_name' => 'newname.docx'), 'billing'=>array('paymentDate'=>'July 26,2013 12:40', 'discount' => '0', 'totalRevisionCharge' => '$20.00', 'totalAmountPayed' => '$20.00', 'revisionLevel' => '1', 'chargeType'=> '1', 'numPages' => '60', 'numWords' => '120,000' ) ), array('taskid' => 12, 'assignee'=>'argie1234', 'owner'=>'usaroberto', 'details' => array( 'code' => 'E', 'status'=>'TC', 'targetCompletionDateUTC'=>'1379401200', 'targetExtentionDateUTC'=>'1379401200', 'submissionDateUTC'=>'1379401200', 'approvalDateUTC'=>'1379401200', 'revisionStartDateUTC'=>'1379401200', 'revisionCompletionDateUTC'=>'1379401200', 'messageToEditor'=>'Please work on it asap.', 'documentType' => 'Thesis'), 'file' => array('orig_name' => 'originalname.docx', 'new_name' => 'newname.docx'), 'billing'=>array('paymentDate'=>'July 26,2013 12:40', 'discount' => '0', 'totalRevisionCharge' => '$20.00', 'totalAmountPayed' => '$20.00', 'revisionLevel' => '1', 'chargeType'=> '1', 'numPages' => '60', 'numWords' => '120,000' ) ), 'account' => array( 'username' => 'marooon55', 'emailadd' => ' marooon@yahoo.com ', 'firstname' => 'Maroon', 'initial' => 'E', 'lastname' => 'Young', 'country' => 'Australia', 'gender' => 'M', 'password' =>'360e2801190744a2af74ef6cbfdb963078b59709', 'activationDate' => '2013-09-13 14:30:34') );
How can I create the above array? I know exactly how to define a multidimensional array, unfortunately, although it is difficult for me to create this complex array dynamically. As a beginner, I donβt even know where to start.