jurchiks Posted February 22, 2014 Report 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
Blink Posted February 22, 2014 Author Report Posted February 22, 2014 viss šis ir iekš $_POST['add'] Quote
jurchiks Posted February 22, 2014 Report Posted February 22, 2014 Eh, tā ir, ka nav indentation. Quote
daGrevis Posted February 23, 2014 Report Posted February 23, 2014 > Eh, tā ir, ka nav indentation. https://www.imperialviolet.org/2014/02/22/applebug.html Quote
Kavacky Posted February 25, 2014 Report Posted February 25, 2014 Tā iet, ja ignorē elementāru principu un taupa uz figūriekavām. Quote
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.