Jump to content

bollenbach

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by bollenbach

  1. guys...i'm sorry but...i've been working on the same assignment for the last 3 daysif there's someone out there that knows a lot about PHPcan you please post in this thread if you can help meI just want this damn assignment to be done so I can forget about PHP for a while :)

  2. alright so...here's the code:function load_data() //get array from CSV file{$categories = fopen("categories.csv", "r+"); //Opens categories.csv//creates an array of the csv filewhile (($cat = fgetcsv($categories, 1000, ",")) !== FALSE) { $data[] = $cat; //assigns $cat to array }$rows = count($data); //counts up array/*for ($d=0 ; $d < $rows ; $d++){echo $data[$d][1] . "\n" . "<br />";}*/fclose($categories);}function load_data2(){$vencat = fopen("venue_categories.csv", "r+"); //Opens venue_categories.csvwhile (($cat = fgetcsv($vencat, 1000, ",")) !== FALSE) { $data2[] = $cat; //assigns $cat to array } $rows2 = count($data2); //counts up 2nd array /*for ($e=0 ; $e < $rows2 ; $e++) { echo $e.$data2[$e][1] . "\n" . "<br />"; }*/fclose($vencat); //closes CSV FILE}function load_data3() { global($data2); for ($n = 0; $n<$rows2 ; $n++ ) { $newrow = array($data2[$n][1],$data2[$n][2],$data[$n][1],$data[$n][2]); $giant[] = $newrow; }}What I'm trying to do is pass data and data 2 to my load_data 3 functionany idea what I need to do to do this?I'm trying to make a big array of both smaller arrayshelp would be very much appreciated.

  3. What I'm trying to do is this:I have an ARRAY for a bunch of venues with addresses and telephone numbers (200 venues)THIS ARRAY IS DISPLAYED AS A TABLE(30 venues per page on several pages) -- this is all doneThen I have a CSV file with categories:/* * This array represents categories in which event venues may be placed. * The categories listed are not meant to be exhaustive. */0,"bar"1,"dance club"2,"lounge"3,"pub"4,"restaurant"5,"comedy"6,"art"7,"live theatre"8,"film"9,"other"and another file with/* * This data represents categories assigned to each venue. The first * element in each row represents the unique venue ID. All remaining * elements represent the various categories assigned to a venue. This * sample only shows how the array may be constructed -- remaining data * is missing and must be filled in. */0,0,41,62,63,64,7(it goes on till about 200)and essentially what I have to do is... make a form so that I can manipulate this data..and I want the category info to be displayed where the array for the venues get displayed (in the table)does anyone have a good idea for an approach to this?

  4. Hey I was just wondering if anyone would be interested in helping me with a little simple javascript assignment that I'm doing for school.My javascript skills are pretty poor but I know the basics...My teacher never gives us working examples and he only explains some stuff.So anyway, I'm basically just manipulating a 2d array and doing some popupsreply if interested :)

×
×
  • Create New...