Puika1 Posted November 25, 2009 Report Share Posted November 25, 2009 ka var izlabot so kludu " Warning: Invalid argument supplied for foreach() in /home/machoo/public_html/member_update.php on line 11 " // update custom fields $customfields = $ipbwi->member->listCustomFields(); foreach($customfields as $field){ $ipbwi->member->updateCustomField($field['pf_id'],$_POST['field_'.$field['pf_id']]); } un 11 rinda ir shi foreach($customfields as $field){ Quote Link to comment Share on other sites More sharing options...
briedis Posted November 25, 2009 Report Share Posted November 25, 2009 Un ko izdrukā print_r($customfields) ? Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 reku pilns kods http://paste.php.lv/99f037f5b109e3e61974ed3f2a08835b?lang=php Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 25, 2009 Report Share Posted November 25, 2009 Un kāda būtu atbilde uz brieža uzdoto jautājumu? Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 to es nezinu Quote Link to comment Share on other sites More sharing options...
briedis Posted November 25, 2009 Report Share Posted November 25, 2009 to es nezinu Un kā mēs to varam zināt? Ta kļūda varētu rasties tieši dēļ tā, ka tas mainīgais nav masīvs. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 25, 2009 Report Share Posted November 25, 2009 Starp desmito un vienpadsmito rindiņu ieraksti brieža doto: print_r($customfields); un pastāsti, kas tiek izdrukāts. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 tas past,vai nau iespeja sim scriptam nonemt eror pazinojumus,butiba vins man strada bet kad uzpiez update profile tad izmet ara to error Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 25, 2009 Report Share Posted November 25, 2009 Neticu! Jābūt vēl kaut kam bez tā errora! Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 (edited) tagad rada baltu lapu ar sadu eror Parse error: syntax error, unexpected '}' in /home/machoo/public_html/member_update.php on line 115 kad iekopeju brieza variantu es mazliet biju mainijis scriptu un saja http://paste.php.lv/99f037f5b109e3e61974ed3f2a08835b 115 rinda ir 114 rinda (# <?php }else{ ?>) Edited November 25, 2009 by Puika1 Quote Link to comment Share on other sites More sharing options...
briedis Posted November 25, 2009 Report Share Posted November 25, 2009 Nezinu ko tur tur mainīji, bet acīmredzot figūriekava nevietā (aizmirsts semikols vai pa daudz iekavu) tak vienkarši vajadzēja ielikt to print_r() tieši pirmos foreach. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 (edited) es padomaju un isteniba neko nemainiju tikai pieliku so (print_r($customfields);) un tas nozime ka pa vienu rindu pacelas.Be nau nekadas iespejas uzlikt ta lai ta kluda butu,bet pazinojumu neraditu,jo teoretiski man viss strada Edited November 25, 2009 by Puika1 Quote Link to comment Share on other sites More sharing options...
v3rb0 Posted November 25, 2009 Report Share Posted November 25, 2009 http://lv.php.net/if http://lv.php.net/is_array Quote Link to comment Share on other sites More sharing options...
bubu Posted November 27, 2009 Report Share Posted November 27, 2009 Tas kļūdas paziņojums saka, ka $customfields mainīgais īstenībā nav masīvs. Jo foreach pa citu nemāk cikloties. Pārliecinies, ka tas ir masīvs, piemēram, ar tev jau teiktajām metodēm - print_r vai is_array funkcijām. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 27, 2009 Author Report Share Posted November 27, 2009 paldies jau viss strada :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.