jurchiks Posted February 22, 2014 Report Share Posted February 22, 2014 (edited) $v4 = array(); foreach($array AS $sub_array) { $v4[] = $sub_array; } Tu maz saproti, ko šis dara? Tu burtiski tikai nokopē $array uz $v4. Vēl būtisks ir fakts, ka $array netiek definēts ārpus "if(isset($_POST['add']))", un ja šis returno false vai $_POST['vardi'] ir tukšs, tad tālāk kodā, mēģinot piekļūt $array, metīs warning - undefined variable. Edited February 22, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
Blink Posted February 22, 2014 Author Report Share Posted February 22, 2014 viss šis ir iekš $_POST['add'] Quote Link to comment Share on other sites More sharing options...
jurchiks Posted February 22, 2014 Report Share Posted February 22, 2014 Eh, tā ir, ka nav indentation. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 23, 2014 Report Share Posted February 23, 2014 > Eh, tā ir, ka nav indentation. https://www.imperialviolet.org/2014/02/22/applebug.html Quote Link to comment Share on other sites More sharing options...
jurchiks Posted February 23, 2014 Report Share Posted February 23, 2014 LOL. Quote Link to comment Share on other sites More sharing options...
Kavacky Posted February 25, 2014 Report Share Posted February 25, 2014 Tā iet, ja ignorē elementāru principu un taupa uz figūriekavām. 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.