Jump to content

Search the Community

Showing results for tags 'multidimensionalarray'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I have a 1 dimensional array from a database output that I need to have in a multidimensional array ($tasks): array 0 => array 'sr_id' => string '4902367' (length=7) 'description' => string 'GLS Jersey Mikes Installation Checklist' (length=39) 'due_date' => string '2012-01-07 23:24:00' (length=19) 'sr_fe_task_id' => string '220958' (length=6) 1 => array 'sr_id' => string '4902367' (length=7) 'description' => string 'Please submit your pictures of the installation area before any work was performed.' (length=83) 'due_date' => string '2012-01-07 23:24:00' (length=19) 'sr_fe_task_id' => string '220959' (length=6) 2 => array 'sr_id' => string '4902367' (length=7) 'description' => string 'Please submit your pictures of the installation area after all work was completed.' (length=82) 'due_date' => string '2012-01-07 23:24:00' (length=19) 'sr_fe_task_id' => string '220960' (length=6) 3 => array 'sr_id' => string '4903303' (length=7) 'description' => string 'Upload pictures of colored patch cables connected to back of router.' (length=116) 'due_date' => string '2012-01-07 23:31:00' (length=19) 'sr_fe_task_id' => string '220961' (length=6) 4 => array 'sr_id' => string '4899664' (length=7) 'description' => string 'Please upload all pictures taken on site.' (length=41) 'due_date' => string '2012-01-17 17:33:00' (length=19) 'sr_fe_task_id' => string '222839' (length=6) Each sr_id may have more than one task under it and each task has a due_date and description under it, but I'm having trouble getting the descriptions and due_dates under each task: ['sr_id'] =>4902367 ['sr_fe_task_id'] => 220958 ['description']=> "GLS Jersey Mikes Installation Checklist" ['due_date']=> '2011-12-08 17:50:00' ['sr_fe_task_id'] => 220959 ['description']=> "Pleease submit your pictures of the installation area." ['due_date']=> '2012-01-07 23:24:00' ['sr_id'] =>4903303 ['sr_fe_task_id'] => 220961 ['description']=> "Upload pictures of colored patch cables connected to back of router." ['due_date']=> '2012-01-07 23:31:00' I've got it to where each sr_id is listed along with all the tasks underneath of them, but can't get it to where each task has the description and due date under it: for ($i=0; $i<COUNT($tasks); $i++){ $task_list[$tasks[$i]['sr_id']]['task_id'][$tasks[$i]['sr_fe_task_id']] =$tasks[$i]['sr_fe_task_id']; foreach ($task_list[$tasks[$i]['sr_id']]['task_id'] as $v){ $task_list[$tasks[$i]['sr_id']]['task_id'][$v][$tasks[$i]['due_date']]; } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.