Search found 3 matches

by ShadowDog
Wed Mar 30, 2011 8:23 pm
Forum: PHP - Code
Topic: Make a multidemensional array 1-indexed from string-indexed?
Replies: 4
Views: 273

Re: Make a multidemensional array 1-indexed from string-inde

Thank you. Unfortunately, I've run into another horrible error. <?php function fixit($tofix) { if($fix_ini[curlp][$tofix]) { return $fix_ini[curlp][$tofix]; } else { return $props[$tofix]; } } $ini = parse_ini_file('letsplay.ini',true); $fix_ini = parse_ini_file('fix.ini',true); //asorti($ini); ukso...
by ShadowDog
Wed Mar 30, 2011 3:43 pm
Forum: PHP - Code
Topic: Make a multidemensional array 1-indexed from string-indexed?
Replies: 4
Views: 273

Re: Make a multidemensional array 1-indexed from string-inde

Thank you. I completely messed up last time I tried foreach(). Though I noticed that it did sort based on case, and with genres set were at the top. Oddly, switching from asort($ini); to uksort($ini, 'strcasecmp'); worked perfectly (though the Hexen LP is still being a jerk...). Thanks for the help!...
by ShadowDog
Wed Mar 30, 2011 1:27 pm
Forum: PHP - Code
Topic: Make a multidemensional array 1-indexed from string-indexed?
Replies: 4
Views: 273

Make a multidemensional array 1-indexed from string-indexed?

<?php $ini = parse_ini_file('letsplay.ini',true); asort($ini); $cur_num = 1; while($cur_num <= count($ini)) { //This should look in the first entry and return the url, name, and author. Instead, it goes "by" for about 693 lines. echo('<a href="' . $ini[$cur_num]['url'] . '">' . ...