Hello.
I have data in a MySQL Table that adheres to the below: (note, no index, could add if necessary)
group~~~~~setting~~~~~value
1~~~~~~~~~Babble~~~~~Yeah, sure
1~~~~~~~~~Dabble~~~~~No, rather not
2~~~~~~~~~Crab~~~~~~~Maybe
3~~~~~~~~~Flab~~~~~~~Nah, not today
I want to query this and add it to an associative multidimensional array.
I have the following:
Line number On/Off | Expand/Contract $getem = array(array()); while ($row = mysql_fetch_assoc($result)) { $getem[][] = $row['group']; $getem[][] = $row['setting']; $getem[][] = $row['value']; }
Of course, this is not associative. I thought if I changed $getem = array(array()); to $getem = array( array('group', 'setting', 'value') );, then it would be associative, but this isn't working.
My ultimate goal is this:
I have a second table in which the 'group' of the above table is a FK to the index of the second table. The end result, once processed and matched using PHP, is to print out the following:
Group Name 1
~~~Babble~~~Year, sure
~~~Dabble~~~No, rather not
Group Name 2
~~~Crab~~~~Maybe
Group Name 3
~~~Flab~~~~Nah, not today
Am I on the right track? You don't need to write the code for me, I'm just looking for a little direction.
Thanks
include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some questions with it.So there is the index.php on the server of the person who bought it
Convert Binary String to Decimal
Trying to Get:Decimal: 305419896Out of:Binary String: xV4
Why use OOP?
Can someone explain to me why I should use OOP instead of procedure based code.Im building a shopping cart and i created and Item object already and using it to hold data for each item. But this
Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this linkexample:http://localhost/articlemania/category.php?cid=3" it's give me an errorhere is :" Warning: mysql_num_rows() expects parameter 1 to be
Facebook status update API
Hello,So, I'm trying to create my first Facebook application with PHP.Basic ideas for my application:My website includes feature called “tip of the week" and i would like to create a code
Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLANK entries, into my process php script, using feof, I have failed many times and get so many errors
Help =( !! Upload Pics [PHP script]
HelloI need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (watermark the uploaded pictures) , thats mean its watermark & upload in the same time . look this
Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a switch function to reduce redundancies, and to efficaciously implement the script on to other
need help with date function
i have following form for dateCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For instance on line 20? I know how to write text to the bottom of the file but not how i can get it to