IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

arguments de array_combine détectés de longueur inégale [PHP 7]


Sujet :

Langage PHP

  1. #1
    Expert confirmé
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 382
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 382
    Points : 5 732
    Points
    5 732
    Billets dans le blog
    1
    Par défaut arguments de array_combine détectés de longueur inégale
    Bonjour,

    ce code :
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    $key = self::$header;
    $value = $row;
    self::$data[] = array_combine($key, $value);
    produit le message d'erreur
    Fatal error: Uncaught ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in C:\projets\ticket_rawsrc\model\CSVParser.php:83 Stack trace: #0 C:\projets\ticket_rawsrc\model\CSVParser.php(83): array_combine(Array, Array) #1 C:\projets\ticket_rawsrc\model\CSVImport.php(38): ticket_rawsrc\model\CSVParser::parse('C:\\projets\\tick...', 4096) #2 C:\projets\ticket_rawsrc\controller\CSVImportController.php(72): ticket_rawsrc\model\CSVImport::uploadFile('C:\\projets\\tick...') #3 C:\projets\ticket_rawsrc\index.php(112): ticket_rawsrc\controller\CSVImportController->invoke(Array) #4 {main} thrown in C:\projets\ticket_rawsrc\model\CSVParser.php on line 83
    alors que les 2 arguments sont des tableaux de 168 éléments. Quelle peut être la raison ?
    Il vaut mieux viser la perfection et la manquer que viser l'imperfection et l'atteindre. - Bertrand Russell

    Si la discussion est résolue, merci de cliquer sur le bouton

  2. #2
    Expert éminent
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 098
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 098
    Points : 8 207
    Points
    8 207
    Billets dans le blog
    17
    Par défaut
    Tu es sûr de toi ? Tu ne montres pas le débug

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    $key = self::$header;
    $value = $row;
    echo 'key count : ', count($key);
    echo 'value count : ', count($value);
    self::$data[] = array_combine($key, $value);
    Si les valeurs sont bonnes donne-nous ceci qu'on voit ce que les variables ont dans le ventre :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    var_export($key);
    var_export($value);
    Un problème exposé clairement est déjà à moitié résolu
    Keep It Smart and Simple

  3. #3
    Expert confirmé
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 382
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 382
    Points : 5 732
    Points
    5 732
    Billets dans le blog
    1
    Par défaut
    Merci de me répondre. Bientôt, plus dispo jusqu'à dimanche soir...



    key count : 168value count : 168

    array ( 0 => 'mois de months', 1 => 'priority (group)', 2 => 'incident/work order', 3 => 'months', 4 => 'serviceline', 5 => 'support group role', 6 => '1', 7 => 'actual end date time', 8 => 'actual start date time', 9 => 'assigned group', 10 => 'assigned org', 11 => 'assignee', 12 => 'assignee sesa id', 13 => 'associated rkm', 14 => 'associated rkm number', 15 => 'associated rkm title', 16 => 'audit id', 17 => 'backlog (copy 2)', 18 => 'ci', 19 => 'client details', 20 => 'closed/completed date time', 21 => 'cluster', 22 => 'cluster (first assigned group)', 23 => 'contact first name', 24 => 'contact last name', 25 => 'contact sesa id', 26 => 'country', 27 => 'customer client details', 28 => 'customer connectivty type', 29 => 'customer department', 30 => 'customer first name', 31 => 'customer job code', 32 => 'customer last name', 33 => 'customer organization', 34 => 'customer sesa id', 35 => 'customer subsidiary company', 36 => 'customer user seg', 37 => 'customer vendor identity', 38 => 'date filter', 39 => 'date selector', 40 => 'date selector param', 41 => 'eco system/teams', 42 => 'eco system/teams (first assigned group)', 43 => 'first assigned group', 44 => 'form', 45 => 'impact', 46 => 'ksr number', 47 => 'last modified date time', 48 => 'last resolved date time', 49 => 'marked as duplicate', 50 => 'month.v.0', 51 => 'operational cat calculated', 52 => 'operational cat tier 1', 53 => 'operational cat tier 2', 54 => 'operational cat tier 3', 55 => 'organization', 56 => 'organization (first assigned group)', 57 => 'practices', 58 => 'practices (first assigned group)', 59 => 'previous month', 60 => 'priority', 61 => 'product cat calculated', 62 => 'product cat tier 1', 63 => 'product cat tier 2', 64 => 'product cat tier 3', 65 => 'product name', 66 => 'region', 67 => 'region calculated', 68 => 'regions', 69 => 'regions (1)', 70 => 'reopened', 71 => 'reported source', 72 => 'resolution', 73 => 'resolution ola status', 74 => 'resolution op cat calculated', 75 => 'resolution op cat tier 1', 76 => 'resolution op cat tier 2', 77 => 'resolution op cat tier 3', 78 => 'resolution prod cat calculated', 79 => 'resolution prod cat tier 1', 80 => 'resolution prod cat tier 2', 81 => 'resolution prod cat tier 3', 82 => 'resolution product name', 83 => 'resolution sla status', 84 => 'rkm article associated', 85 => 'scheduled end date time', 86 => 'scheduled start date time', 87 => 'sd/oss', 88 => 'sd/oss (first assigned group)', 89 => 'se digital domains', 90 => 'se digital domains (first assigned group)', 91 => 'service', 92 => 'silver support', 93 => 'site', 94 => 'sla status', 95 => 'status', 96 => 'status reason', 97 => 'submit date time', 98 => 'submitter', 99 => 'submitter country', 100 => 'submitter site', 101 => 'summary', 102 => 'template name', 103 => 'ticket hyperlink', 104 => 'ticket number', 105 => 'ticket type', 106 => 'urgency', 107 => 'vendor', 108 => 'vendor (first assigned group)', 109 => 'vendor group', 110 => 'vendor ticket number', 111 => 'week', 112 => 'zone', 113 => 'zone (copy)', 114 => 'backlog% target', 115 => 'cancelled/rejected', 116 => 'color month', 117 => 'count', 118 => 'current month', 119 => 'effort time spent', 120 => 'group transfers', 121 => 'group transfers not help desk', 122 => 'hdf% threshold', 123 => 'help desk fix%', 124 => 'help desk fix% (copy 2)', 125 => 'help desk fix% (copy)', 126 => 'help desk% target', 127 => 'ksr count', 128 => 'min', 129 => 'month.v1', 130 => 'mttr threshold wo', 131 => 'mttr (calendar days)', 132 => 'mttr (calendar days) (copy 2)', 133 => 'mttr (otat)', 134 => 'mttr (otat) r&d logic', 135 => 'mttr (weekdays)', 136 => 'mttr (weekdays) (copy)', 137 => 'mttr net (calendar days)', 138 => 'nombre d\'enregistrements', 139 => 'ph tk % threshold (copy)', 140 => 'phone tickets', 141 => 'previous month (copy)', 142 => 'previous month (copy)2', 143 => 'r&d logic', 144 => 'r&d logic - open', 145 => 're-opened threshold', 146 => 're-opened% target', 147 => 'reopened ticket %', 148 => 'reopened ticket % (copy 2)', 149 => 'reopened ticket % (copy)', 150 => 'resolved', 151 => 'response ola status', 152 => 'response sla status', 153 => 'sla target', 154 => 'sla threshold', 155 => 'sla% (itr%)', 156 => 'sla% (itr%) (copy)', 157 => 'sla% (itr%) r&d logic', 158 => 'strike rule', 159 => 'submitted', 160 => 'ticket age (calendar days)', 161 => 'ticket age (weekdays)', 162 => 'ticket age (weekdays) (copy)', 163 => 'ticket count', 164 => 'ticket per user', 165 => 'time in pending (min)', 166 => 'time in pending client (min)', 167 => 'total time spent', )array ( 0 => 'sept-21', 1 => 'P4', 2 => 'Incident', 3 => '01/09/2021 00:00', 4 => 'Other', 5 => 'Tier 3', 6 => '1', 7 => '', 8 => '', 9 => 'IAM_SUPPORT_WW_L3', 10 => 'Application Maintenance', 11 => 'KESHAV SINGH', 12 => 'SESA566744', 13 => '', 14 => '', 15 => '', 16 => 'INC000005979806', 17 => 'N', 18 => '', 19 => '', 20 => '20/09/2021 00:00', 21 => '', 22 => '', 23 => '', 24 => '', 25 => '', 26 => 'Algeria', 27 => 'Invensys Employee', 28 => 'ON_COR', 29 => 'Customer Projects & Services', 30 => 'SAMIR', 31 => 'DPT6', 32 => 'HARRAR', 33 => 'Invensys', 34 => 'SESA315630', 35 => 'Invensys Systems Algeria', 36 => 'Power User', 37 => '', 38 => 'Hide', 39 => 'FAUX', 40 => 'FAUX', 41 => 'User Governance and Administration', 42 => 'GSD', 43 => 'FJTU_SERVICE_DESK_EMEA_ISMA_L1', 44 => 'Incident', 45 => 'Minor/Localized', 46 => 'KSR000012469337', 47 => '20/09/2021 00:27', 48 => '14/09/2021 08:38', 49 => 'No', 50 => 'sept-21', 51 => 'Disable-Services-Account', 52 => 'Disable', 53 => 'Services', 54 => 'Account', 55 => 'Schneider Digital', 56 => 'Schneider Digital', 57 => 'HR Systems & Employee Experience', 58 => 'HR Systems & Employee Experience', 59 => 'Hide', 60 => 'Low', 61 => 'Active Directory', 62 => 'Application', 63 => 'Global', 64 => 'Identity & Access Management', 65 => 'Active Directory', 66 => 'ISMA', 67 => 'MEA', 68 => 'INVENSYS', 69 => 'MEA', 70 => 'No', 71 => 'Phone', 72 => 'Please retrigger the profile.', 73 => 'Missed', 74 => 'Disable-Services-Account', 75 => 'Disable', 76 => 'Services', 77 => 'Account', 78 => 'Active Directory', 79 => 'Application', 80 => 'Global', 81 => 'Identity & Access Management', 82 => 'Active Directory', 83 => 'Missed', 84 => 'No', 85 => '', 86 => '', 87 => '', 88 => 'EMEAS SD', 89 => 'Enterprise IT', 90 => 'Enterprise IT', 91 => 'System Access and Network', 92 => '', 93 => 'DZALG00001', 94 => 'Service Targets Breached', 95 => 'Closed', 96 => 'Automated Resolution Reported', 97 => '06/09/2021 09:11', 98 => 'BMC_WS_CORDYS', 99 => '', 100 => '', 101 => 'Active Directory Account - Issue', 102 => '', 103 => 'https://support.schneider-electric.com/arsys/forms/itsmprd/SHR%3ALandingConsole/Default+Administrator+View/?mode=search&F304255500=HPD%3AHelp+Desk&F1000000076=FormOpenNoAppList&F303647600=SearchTicketWithQual&F304255610=\'1000000161\'%3D%22INC000010005928%22', 104 => 'INC000010005928', 105 => 'User Service Restoration', 106 => 'Low', 107 => '', 108 => 'FJTU', 109 => '', 110 => 'INC0228102', 111 => '05/09/2021 00:00', 112 => 'Africa', 113 => 'Africa', 114 => '5%', 115 => '0', 116 => '01/09/2021 00:00', 117 => '1', 118 => '', 119 => '0', 120 => '1', 121 => '1', 122 => 'N', 123 => '0,00%', 124 => '0,00%', 125 => '0,00%', 126 => '50%', 127 => '1', 128 => '1', 129 => '9', 130 => 'N', 131 => '7,98', 132 => '7,98', 133 => '7', 134 => '', 135 => '7', 136 => '7', 137 => '-1 447,42', 138 => '1', 139 => 'Y', 140 => '100,00%', 141 => '', 142 => '1', 143 => '0', 144 => '0', 145 => 'Y', 146 => '2%', 147 => '0,00%', 148 => '0,00%', 149 => '0,00%', 150 => '1', 151 => '5', 152 => 'Missed', 153 => '90%', 154 => 'Y', 155 => '0,00%', 156 => '0,00%', 157 => '', 158 => '', 159 => '1', 160 => '7,98', 161 => '7', 162 => '7', 163 => '1', 164 => '1', 165 => '1 455,40', 166 => '1 455,40', 167 => '0', )



    key count : 168value count : 73

    array ( 0 => 'mois de months', 1 => 'priority (group)', 2 => 'incident/work order', 3 => 'months', 4 => 'serviceline', 5 => 'support group role', 6 => '1', 7 => 'actual end date time', 8 => 'actual start date time', 9 => 'assigned group', 10 => 'assigned org', 11 => 'assignee', 12 => 'assignee sesa id', 13 => 'associated rkm', 14 => 'associated rkm number', 15 => 'associated rkm title', 16 => 'audit id', 17 => 'backlog (copy 2)', 18 => 'ci', 19 => 'client details', 20 => 'closed/completed date time', 21 => 'cluster', 22 => 'cluster (first assigned group)', 23 => 'contact first name', 24 => 'contact last name', 25 => 'contact sesa id', 26 => 'country', 27 => 'customer client details', 28 => 'customer connectivty type', 29 => 'customer department', 30 => 'customer first name', 31 => 'customer job code', 32 => 'customer last name', 33 => 'customer organization', 34 => 'customer sesa id', 35 => 'customer subsidiary company', 36 => 'customer user seg', 37 => 'customer vendor identity', 38 => 'date filter', 39 => 'date selector', 40 => 'date selector param', 41 => 'eco system/teams', 42 => 'eco system/teams (first assigned group)', 43 => 'first assigned group', 44 => 'form', 45 => 'impact', 46 => 'ksr number', 47 => 'last modified date time', 48 => 'last resolved date time', 49 => 'marked as duplicate', 50 => 'month.v.0', 51 => 'operational cat calculated', 52 => 'operational cat tier 1', 53 => 'operational cat tier 2', 54 => 'operational cat tier 3', 55 => 'organization', 56 => 'organization (first assigned group)', 57 => 'practices', 58 => 'practices (first assigned group)', 59 => 'previous month', 60 => 'priority', 61 => 'product cat calculated', 62 => 'product cat tier 1', 63 => 'product cat tier 2', 64 => 'product cat tier 3', 65 => 'product name', 66 => 'region', 67 => 'region calculated', 68 => 'regions', 69 => 'regions (1)', 70 => 'reopened', 71 => 'reported source', 72 => 'resolution', 73 => 'resolution ola status', 74 => 'resolution op cat calculated', 75 => 'resolution op cat tier 1', 76 => 'resolution op cat tier 2', 77 => 'resolution op cat tier 3', 78 => 'resolution prod cat calculated', 79 => 'resolution prod cat tier 1', 80 => 'resolution prod cat tier 2', 81 => 'resolution prod cat tier 3', 82 => 'resolution product name', 83 => 'resolution sla status', 84 => 'rkm article associated', 85 => 'scheduled end date time', 86 => 'scheduled start date time', 87 => 'sd/oss', 88 => 'sd/oss (first assigned group)', 89 => 'se digital domains', 90 => 'se digital domains (first assigned group)', 91 => 'service', 92 => 'silver support', 93 => 'site', 94 => 'sla status', 95 => 'status', 96 => 'status reason', 97 => 'submit date time', 98 => 'submitter', 99 => 'submitter country', 100 => 'submitter site', 101 => 'summary', 102 => 'template name', 103 => 'ticket hyperlink', 104 => 'ticket number', 105 => 'ticket type', 106 => 'urgency', 107 => 'vendor', 108 => 'vendor (first assigned group)', 109 => 'vendor group', 110 => 'vendor ticket number', 111 => 'week', 112 => 'zone', 113 => 'zone (copy)', 114 => 'backlog% target', 115 => 'cancelled/rejected', 116 => 'color month', 117 => 'count', 118 => 'current month', 119 => 'effort time spent', 120 => 'group transfers', 121 => 'group transfers not help desk', 122 => 'hdf% threshold', 123 => 'help desk fix%', 124 => 'help desk fix% (copy 2)', 125 => 'help desk fix% (copy)', 126 => 'help desk% target', 127 => 'ksr count', 128 => 'min', 129 => 'month.v1', 130 => 'mttr threshold wo', 131 => 'mttr (calendar days)', 132 => 'mttr (calendar days) (copy 2)', 133 => 'mttr (otat)', 134 => 'mttr (otat) r&d logic', 135 => 'mttr (weekdays)', 136 => 'mttr (weekdays) (copy)', 137 => 'mttr net (calendar days)', 138 => 'nombre d\'enregistrements', 139 => 'ph tk % threshold (copy)', 140 => 'phone tickets', 141 => 'previous month (copy)', 142 => 'previous month (copy)2', 143 => 'r&d logic', 144 => 'r&d logic - open', 145 => 're-opened threshold', 146 => 're-opened% target', 147 => 'reopened ticket %', 148 => 'reopened ticket % (copy 2)', 149 => 'reopened ticket % (copy)', 150 => 'resolved', 151 => 'response ola status', 152 => 'response sla status', 153 => 'sla target', 154 => 'sla threshold', 155 => 'sla% (itr%)', 156 => 'sla% (itr%) (copy)', 157 => 'sla% (itr%) r&d logic', 158 => 'strike rule', 159 => 'submitted', 160 => 'ticket age (calendar days)', 161 => 'ticket age (weekdays)', 162 => 'ticket age (weekdays) (copy)', 163 => 'ticket count', 164 => 'ticket per user', 165 => 'time in pending (min)', 166 => 'time in pending client (min)', 167 => 'total time spent', )array ( 0 => 'sept-21', 1 => 'P3', 2 => 'Incident', 3 => '01/09/2021 00:00', 4 => 'PDM Blue Box', 5 => 'Help Desk', 6 => '1', 7 => '', 8 => '', 9 => 'FJTU_SERVICE_DESK_EMEA_ISMA_L1', 10 => 'Service Desk', 11 => 'FUJISTU OSMQ', 12 => 'FUJISTU_OSMQ', 13 => '', 14 => '', 15 => '', 16 => 'INC000005973287', 17 => 'N', 18 => '', 19 => '', 20 => '16/09/2021 00:00', 21 => '', 22 => '', 23 => '', 24 => '', 25 => '', 26 => 'Algeria', 27 => '', 28 => 'ON_COR', 29 => 'Finance', 30 => 'WALID', 31 => 'FHF6', 32 => 'HADJADJ', 33 => 'Global Supply Chain', 34 => 'SESA559278', 35 => 'SCHNEIDER ELECTRIC ALGERIE', 36 => 'Casual Traveler', 37 => '', 38 => 'Hide', 39 => 'FAUX', 40 => 'FAUX', 41 => 'GSD', 42 => 'GSD', 43 => 'FJTU_SERVICE_DESK_RD_L2', 44 => 'Incident', 45 => 'Moderate/Limited', 46 => 'KSR000012449855', 47 => '16/09/2021 00:18', 48 => '10/09/2021 06:57', 49 => 'No', 50 => 'sept-21', 51 => 'Troubleshoot-Application-OE Tools', 52 => 'Troubleshoot', 53 => 'Application', 54 => 'OE Tools', 55 => 'Schneider Digital', 56 => 'Schneider Digital', 57 => 'HR Systems & Employee Experience', 58 => 'HR Systems & Employee Experience', 59 => 'Hide', 60 => 'Medium', 61 => 'Opus', 62 => 'Software', 63 => 'Application', 64 => 'Engineering Applications', 65 => 'Opus', 66 => 'ISMA', 67 => 'MEA', 68 => 'MEA', 69 => 'MEA', 70 => 'No', 71 => 'Web', 72 => '"ISSUE: Opus - OE Tools', )


    Fatal error: Uncaught ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in C:\projets\ticket_rawsrc\model\CSVParser.php:100 Stack trace: #0 C:\projets\ticket_rawsrc\model\CSVParser.php(100): array_combine(Array, Array) #1 C:\projets\ticket_rawsrc\model\CSVImport.php(38): ticket_rawsrc\model\CSVParser::parse('C:\\projets\\tick...', 4096) #2 C:\projets\ticket_rawsrc\controller\CSVImportController.php(72): ticket_rawsrc\model\CSVImport::uploadFile('C:\\projets\\tick...') #3 C:\projets\ticket_rawsrc\index.php(112): ticket_rawsrc\controller\CSVImportController->invoke(Array) #4 {main} thrown in C:\projets\ticket_rawsrc\model\CSVParser.php on line 100
    Il vaut mieux viser la perfection et la manquer que viser l'imperfection et l'atteindre. - Bertrand Russell

    Si la discussion est résolue, merci de cliquer sur le bouton

  4. #4
    Expert confirmé
    Avatar de laurentSc
    Homme Profil pro
    Webmaster débutant perpétuel !
    Inscrit en
    Octobre 2006
    Messages
    10 382
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Webmaster débutant perpétuel !
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2006
    Messages : 10 382
    Points : 5 732
    Points
    5 732
    Billets dans le blog
    1
    Par défaut
    J'aurais du faire ce debug plus tôt, car quand $key et $value n'ont pas la même longueur, le message d'erreur est normal. J'ai reproduit avec des données bien moins nombreuses :

    key count : 11value count : 5

    key(0)'mois de months'
    key(1)'regions (1)'
    key(2)'reopened'
    key(3)'reported source'
    key(4)'resolution'
    key(5)'resolution ola status'
    key(6)'resolution op cat calculated'
    key(7)'resolution op cat tier 1'
    key(8)'resolution op cat tier 2'
    key(9)'resolution op cat tier 3'
    key(10)''
    value(0)'sept-21'
    value(1)'MEA'
    value(2)'No'
    value(3)'Web'
    value(4)'"ISSUE: Opus - OE Tools'



    Fatal error: Uncaught ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in C:\projets\ticket_rawsrc\model\CSVParser.php:116 Stack trace: #0 C:\projets\ticket_rawsrc\model\CSVParser.php(116): array_combine(Array, Array) #1 C:\projets\ticket_rawsrc\model\CSVImport.php(38): ticket_rawsrc\model\CSVParser::parse('C:\\projets\\tick...', 4096) #2 C:\projets\ticket_rawsrc\controller\CSVImportController.php(72): ticket_rawsrc\model\CSVImport::uploadFile('C:\\projets\\tick...') #3 C:\projets\ticket_rawsrc\index.php(112): ticket_rawsrc\controller\CSVImportController->invoke(Array) #4 {main} thrown in C:\projets\ticket_rawsrc\model\CSVParser.php on line 116
    J'avais amélioré le code de debug :
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
                    echo '<br/><br/>key count : ', count($key);
                    echo 'value count : ', count($value)."<br/><br/>";
                    $i=0;
                    foreach($key as $one_key)
                    {
                        echo "key(".$i++.")";
                        var_export($one_key);
                        echo '<br/>';
                    }
                    $i=0;
     
                    foreach($value as $one_value)
                    {
                        echo "value(".$i++.")";
                        var_export($one_value);
                        echo '<br/>';
                    }                echo "<br/><br/>";
                    self::$data[] = array_combine($key, $value);
    Il vaut mieux viser la perfection et la manquer que viser l'imperfection et l'atteindre. - Bertrand Russell

    Si la discussion est résolue, merci de cliquer sur le bouton

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 1
    Dernier message: 21/05/2013, 14h31
  2. Réponses: 2
    Dernier message: 02/08/2011, 17h51
  3. Réponses: 4
    Dernier message: 14/08/2008, 10h46
  4. Réponses: 2
    Dernier message: 22/05/2007, 18h23
  5. Réponses: 3
    Dernier message: 15/02/2006, 17h46

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo