[PHP] Array

2003-06-06 Thread Awlad Hussain
What wrong with this code? i am tryin to create an array from the while loop, but i only get one value :( while($rowmenu = mysql_fetch_array($resultmenu)){ while (list($k, $v) = each ($rowmenu)) { $val[$k] = $v; } } Basically the $rowmenu returns more than one records.. and i want

RE: [PHP] Array

2003-06-06 Thread electroteque
while (list($k, $v) = each ($rowmenu)) { $val[] = $v; } } try that -Original Message- From: Awlad Hussain [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 8:20 PM To: [EMAIL PROTECTED] Subject: [PHP] Array What wrong with this code? i am tryin to create an array from

[PHP] array count() oddity

2003-05-31 Thread Guru Geek
Hello, I have a mysql statement listed below. The table contains about 100 rows of information. Only one row matches the $criteria. Can anyone tell me why the count($myrow) is 8? Shouldn't it be 4 (id, vanNumber, origin, destination)? $criteria = 02-25-2003; $result = mysql_query(SELECT id,

Re: [PHP] array count() oddity

2003-05-31 Thread Kevin Stone
- Original Message - From: Guru Geek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:15 PM Subject: [PHP] array count() oddity Hello, I have a mysql statement listed below. The table contains about 100 rows of information. Only one row matches the $criteria

[PHP] Array conversion

2003-05-30 Thread John Wulff
I'm new to working with complex arrays/objects and need a little help. Below is the array I need to convert to a different type of array. The begin what i have section is data I've succesfully mined from an XML file. The data labeled desired output is how I need the data to be formatted. How do I

Re: [PHP] Array conversion

2003-05-30 Thread Ernest E Vogelsinger
At 01:38 30.05.2003, John Wulff said: [snip] I'm new to working with complex arrays/objects and need a little help. Below is the array I need to convert to a different type of array. The begin what i have section is data I've succesfully mined from an XML

[PHP] array question

2003-05-30 Thread Randy Johnson
How do I access the data in $query_data after I go through the while loop, here is an example $result=mysql_query($query,$link); while ($query_data=mysql_fetch_array($result) ) { $var1=$query_data[var1]; $var1=$query_data[var1]; } after the while is done, How do I access the data in

Re: [PHP] array question

2003-05-30 Thread Randy Johnson
I found this in the manual user comments and it worked great mysql_data_seek($result,0); Randy - Original Message - From: Randy Johnson [EMAIL PROTECTED] To: Brian Dunning [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 10:14 PM Subject: [PHP] array question How do

[PHP] Array Question

2003-04-01 Thread Mark McCulligh
I have two tables that I want to display together as if they were one table and order them by a common date field. Because I am using MySQL I can't use the usually way I would do this. Create a store procedure or view. I was thinking of creating two separate queries in PHP then loading the data

Re: [PHP] Array Question

2003-04-01 Thread skate
look into things like JOIN and SORT BY in MySQL, they're quicker and more efficient than PHP for doing DB stuff (so i'm told) took me awhile to get my head around JOIN, but once you've got it, you'll never be without it ;) Mark McCulligh [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: [PHP] Array Question

2003-04-01 Thread Chris Hayes
At 18:58 1-4-03, you wrote: I have two tables that I want to display together as if they were one table and order them by a common date field. Because I am using MySQL I can't use the usually way I would do this. Create a store procedure or view. Does every row in tableA has a sibling row in

Re: [PHP] Array Question

2003-04-01 Thread Mark McCulligh
I can't link the two tables at all. I need to loop through one displaying its information, then loop through the other table displaying its information. For if I have 5 records in table A and 6 records in table B, I get 11 records total. Each table only has 4-5 fields and they exist in both

Re: [PHP] Array Question

2003-04-01 Thread Mark McCulligh
I have looked at the different JOINs but I can't link any fields together. There is no relationship between the tables. The two table are basically the same table. But the DBA didn't make them one like he should have. Mark. Skate [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] look

Re: [PHP] Array Question

2003-04-01 Thread Tim Burden
. http://www.mysql.com/doc/en/MERGE.html - Original Message - From: Mark McCulligh [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 12:33 PM Subject: Re: [PHP] Array Question I have looked at the different JOINs but I can't link any fields

Re: [PHP] Array Question

2003-04-01 Thread Rob Adams
Creating an array that holds the 11 combined records from the two tables, and sorting the array according to date: (This depends on what type your using to store dates in MySQL, and that the exact date is unique for each record across both tables. If the date isn't unique, it requires a little

[PHP] array into another site

2003-03-25 Thread Fredrik
Hi I have an PHP array and want to send it into another PHP site. $arr = array(251,1,23,54,15,135,1651,156,13,123,321,123,32,54,654,456,32,1); ? script language=JavaScript type=text/javascript a href=\javascript: void(vindu2 = window.open('view.php?arr=?$arr;?','windowname

Re: [PHP] array into another site

2003-03-25 Thread Justin French
: Hi I have an PHP array and want to send it into another PHP site. $arr = array(251,1,23,54,15,135,1651,156,13,123,321,123,32,54,654,456,32,1); ? script language=JavaScript type=text/javascript a href=\javascript: void(vindu2 = window.open('view.php?arr=?$arr;?','windowname','toolbar

Re: [PHP] array into another site

2003-03-25 Thread Ernest E Vogelsinger
At 11:21 25.03.2003, Justin French said: [snip] 1. Missing an equal sign: ?=$ not ?$ window.open('view.php?arr=?=$arr;?','windo... 2. Check out serialize() http://www.php.net/manual/en/function.serialize.php

[PHP] Array query

2003-03-25 Thread shaun
Hi, say I have two arrays: X and Y. How can i get the values I X that arent in Y and assign them to another array? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array query

2003-03-25 Thread Marek Kilimajer
www.php.net/array_diff shaun wrote: Hi, say I have two arrays: X and Y. How can i get the values I X that arent in Y and assign them to another array? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] array

2003-03-24 Thread Wilbert Enserink
Hi all, I'm making a bulk send mail program script. In this script I use an array: now this works fine: $send_vars = array( 'recipients' = array('[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]')

[PHP] array insert help

2003-03-22 Thread Jason Dulberg
I need to create a form where work/home address details need to be entered. I'd like to have these listed as 2 entries in the mysql db so I'm assuming I need to create an array and loop through the array to do the insert. So I have an address[1] and address[2] for example for a total of 12

Re: [PHP] array insert help

2003-03-22 Thread Ernest E Vogelsinger
At 20:59 22.03.2003, Jason Dulberg said: [snip] My problem is that I'm not sure how to set up the array for the fields and how to take the input fields and insert them. Do I need a multidimensional array for this? ie. input type=text name=address[address][]

RE: [PHP] array insert help

2003-03-22 Thread Jason Dulberg
suggested as well. Thanks again! Jason -Original Message- From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED] Sent: March 22, 2003 4:05 PM To: Jason Dulberg Cc: [EMAIL PROTECTED] Subject: Re: [PHP] array insert help At 20:59 22.03.2003, Jason Dulberg said: [snip

RE: [PHP] array insert help

2003-03-22 Thread Ernest E Vogelsinger
At 22:24 22.03.2003, Jason Dulberg said: [snip] Thanks for your help... I tried the code as you suggested however when I attempted to echo the variables for testing but nothing showed. for($i = 0; $i = 1; ++$i) { echo

[PHP] array - and eval

2003-03-21 Thread Wilbert Enserink
Hi all, I'm making a bulk send mail program script. In this script I use an array: now this works fine: $send_vars = array( 'recipients' = array('[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]')

[PHP] Array syntax not covered in documentation

2003-03-12 Thread adrian porter
I want to do the following: $u=preg_replace(/[^$chars]/e,'%.unpack(H2, $0)', $u); However, as you know, unpack returns an array. I tried this instead: $u=preg_replace(/[^$chars]/e,'%.(unpack(H2, $0)[])', $u); but that isn't syntactically correct. I know that this is possible to remedy using

Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread CPT John W. Holmes
I want to do the following: $u=preg_replace(/[^$chars]/e,'%.unpack(H2, $0)', $u); However, as you know, unpack returns an array. I tried this instead: $u=preg_replace(/[^$chars]/e,'%.(unpack(H2, $0)[])', $u); but that isn't syntactically correct. I know that this is possible to remedy

Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread Marek Kilimajer
maybe implode? $u=preg_replace(/[^$chars]/e,%.implode('',unpack(H2, $0)), $u); adrian porter wrote: I want to do the following: $u=preg_replace(/[^$chars]/e,'%.unpack(H2, $0)', $u); However, as you know, unpack returns an array. I tried this instead:

[PHP] array question

2003-03-10 Thread Diana Castillo
If I sort an array, and now the keys are not in numerical order, how can I get the key of the first element? If I do array_shift I get the first element but I want that key. Thanks, Diana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array question

2003-03-10 Thread Jason Wong
On Monday 10 March 2003 21:13, Diana Castillo wrote: If I sort an array, and now the keys are not in numerical order, how can I get the key of the first element? If I do array_shift I get the first element but I want that key. Not very elegant -- there must be a better way? foreach ($doo as

Re: [PHP] array question

2003-03-10 Thread Ernest E Vogelsinger
At 16:35 10.03.2003, Jason Wong said: [snip] Not very elegant -- there must be a better way? foreach ($doo as $key = $value) { print Key:$key Value:$value; break; } [snip] Possibly using array_keys()? $keys =

RE: [PHP] array question

2003-03-10 Thread Ford, Mike [LSS]
-Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 15:35 To: [EMAIL PROTECTED] Subject: Re: [PHP] array question On Monday 10 March 2003 21:13, Diana Castillo wrote: If I sort an array, and now the keys are not in numerical order, how can I

[PHP] Array - Newbie question

2003-03-08 Thread John Taylor-Johnston
New at this, somewhat: ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO = Description, Input Name, Select Name, Option Name, Option Selected, AN = ERIC Number, EricAN, SelAN, AN, AN «Annotation», TI = Title, EricTI, SelTI, BT, BT «Book Title» ); echo

RE: [PHP] Array - Newbie question

2003-03-08 Thread daniel
would this work ? $EricCodesArray[2][2] ? = Original Message From [EMAIL PROTECTED] = New at this, somewhat: ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO = Description, Input Name, Select Name, Option Name, Option Selected, AN = ERIC Number,

Re: [PHP] Array - Newbie question

2003-03-08 Thread John Taylor-Johnston
echo $EricCodesArray[2][2]; No. would this work ? $EricCodesArray[2][2] ? ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO = Description, Input Name, Select Name, Option Name, Option Selected, AN = ERIC Number, EricAN, SelAN, AN, AN «Annotation»,

[PHP] Array - Newbie question

2003-03-08 Thread John Taylor-Johnston
echo $EricCodesArray[2][2]; No. Sorry. Empty set. I would also like to express it something like: select EricCodesArray where TI displays [2] I want to pass TI into a function and build some html for that record. Pseudo code: echo (PTI[0] input name=TI[1] select name=TI[2]option

Re: [PHP] Array - Newbie question

2003-03-08 Thread Jim Lucas
- From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 08, 2003 4:47 PM Subject: [PHP] Array - Newbie question New at this, somewhat: ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO = Description, Input Name, Select Name

RE: [PHP] Array - Newbie question

2003-03-08 Thread John W. Holmes
You need to have this $EricCodesArray = array ( CO = array(Description, Input Name, Select Name, Option Name,

Re: [PHP] Array - Newbie question

2003-03-08 Thread Ernest E Vogelsinger
At 01:47 09.03.2003, John Taylor-Johnston said: [snip] New at this, somewhat: ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO = Description, Input Name, Select Name, Option Name, Option Selected, AN = ERIC Number,

RE: [PHP] Array - Newbie question

2003-03-08 Thread daniel
sorry yeh its not a numbered key as like the next posts $EricCodesArray[TI][2] = Original Message From [EMAIL PROTECTED] = echo $EricCodesArray[2][2]; No. would this work ? $EricCodesArray[2][2] ? ?php #http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( CO =

[PHP] array question

2003-02-24 Thread Richard Kurth
This is the code I am using to get the data out of the text file below. Now I need to turn the $group[3] into an array of its own so that I can make changes to it. How do I turn this into an array that I can reference with $group[0]. What I need to be able to do is search for the label in

Re: [PHP] array question

2003-02-24 Thread Chris Edwards
://www.OuterBanksInternet.com - Original Message - From: Richard Kurth [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:23 PM Subject: [PHP] array question This is the code I am using to get the data out of the text file below. Now I need to turn the $group[3

Re: [PHP] array question

2003-02-24 Thread Bob Irwin
Hi Guys, This might be a bit of a newbie question, but I'm not sure how to search for this particular information as its hard to put in search terms. Say I have a mysql/file with information about variables. Eg, I have a string from a mysql database of 'test' Am I able to then, in PHP, assign

RE: [PHP] array question

2003-02-24 Thread Johnson, Kirk
http://www.php.net/manual/en/language.variables.variable.php Kirk -Original Message- From: Bob Irwin [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:28 PM To: php-general Subject: Re: [PHP] array question Hi Guys, This might be a bit of a newbie question

Re: [PHP] Array instead of Switch

2003-02-22 Thread Markas
David Otton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 22 Feb 2003 03:28:22 -, you wrote: Let's say I need to take one of 20 actions depending on a form selection. I could use a switch statement with 20 cases, but I could also do something like: // Pretend this comes

[PHP] Array instead of Switch

2003-02-21 Thread Chris
Let's say I need to take one of 20 actions depending on a form selection. I could use a switch statement with 20 cases, but I could also do something like: // Pretend this comes from a form $formchoice = mars; $response = array( mars = go_mars(), mercury = go_mercury(), earth =

Re: [PHP] Array instead of Switch

2003-02-21 Thread David T-G
Chris, et al -- ...and then Chris said... % % Let's say I need to take one of 20 actions depending on a form selection. I % could use a switch statement with 20 cases, but I could also do something % like: % % // Pretend this comes from a form % $formchoice = mars; % % % $response = array(

Re: [PHP] Array instead of Switch

2003-02-21 Thread David Otton
On 22 Feb 2003 03:28:22 -, you wrote: Let's say I need to take one of 20 actions depending on a form selection. I could use a switch statement with 20 cases, but I could also do something like: // Pretend this comes from a form $formchoice = mars; $response = array( mars = go_mars(),

RE: [PHP] Array instead of Switch

2003-02-21 Thread John W. Holmes
Let's say I need to take one of 20 actions depending on a form selection. I could use a switch statement with 20 cases, but I could also do something like: // Pretend this comes from a form $formchoice = mars; $response = array( mars = go_mars(), mercury = go_mercury(), earth =

Re: [PHP] array values format

2003-02-20 Thread janet
In a message dated 2/19/2003 8:44:53 PM Pacific Standard Time, [EMAIL PROTECTED] writes: I have a problem here in array manipulations. I need an output like this from the queried data : data1,data2,data3 Any idea how? thanx in advance $string = ''.implode(',',$testarray).''; Janet

Re: [PHP] Array declarations

2003-02-19 Thread Ernest E Vogelsinger
At 22:56 18.02.2003, Joachim Krebs spoke out and said: [snip] Is there any speed difference at all from the following two code blocks (miniscule or not)? If so, which is faster? $cfg[db][host] = ; $cfg[db][user] = ; $cfg[db][pass] = ; or

[PHP] array values format

2003-02-19 Thread Michael P. Carel
hi to all I have a problem here in array manipulations. I need an output like this from the queried data : data1,data2,data3 Any idea how? thanx in advance mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array values format

2003-02-19 Thread Michael P. Carel
Message - From: Chris Cook [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 12:42 PM Subject: Re: [PHP] array values format Hi Michael, Something like this should work: for($i=0; $isizeof($array); $i++) { $data .= $array[$i] . , ; } preg_replace

Re: [PHP] array values format

2003-02-19 Thread Jason Wong
On Thursday 20 February 2003 13:36, Michael P. Carel wrote: as per testing it doesnt delete the last comma, i'm doing something like this: for($i=0;$isizeof($images);$i++) { $pictures .=\./archive/bannerimages/.$bid[$i]./.$images[$i].\.,; } preg_replace(/,$/,,$pictures); echo $pictures;

Re: [PHP] array values format

2003-02-19 Thread Michael P. Carel
thanks it working now - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 2:40 PM Subject: Re: [PHP] array values format On Thursday 20 February 2003 13:36, Michael P. Carel wrote: as per testing it doesnt delete the last

Re: [PHP] Array not working

2003-02-18 Thread Ernest E Vogelsinger
At 08:45 18.02.2003, Chris Blake said: [snip] // THIS IS LINE 27 //print them out to page echo $row['ClientID'].['ClientName'].['Distance']. 'hr'; [snip] Try echo

[PHP] Array declarations

2003-02-18 Thread Joachim Krebs
Is there any speed difference at all from the following two code blocks (miniscule or not)? If so, which is faster? $cfg[db][host] = ; $cfg[db][user] = ; $cfg[db][pass] = ; or $cfg[db] = array(host=, user=, pass=); Joachim -- PHP General Mailing List

[PHP] Array not working

2003-02-17 Thread Chris Blake
Greetings all, My database has one table with three fields i.e. ClientID, ClientName and Distance . I`m trying to get all the field data printed to a form but whenever I try to add the ClientID and Distance fields to the code below it bombs out with the following error : Parse error: parse

[PHP] Array sorting

2003-02-07 Thread Zydox
My question is if anyone have any idé on how to sort this array so that the names and ages are sorted after Close Friend, Friend, Wife and last Family... $A[] = array (Nils, 23, Friend); $A[] = array (Emma, 21, Friend); $A[] = array (Cassie, 21, Wife); $A[] = array (Zydox, 23, Friend); $A[] =

RE: [PHP] Array find a element

2003-02-05 Thread mattias
You can use in_array (http://www.php.net/function.in_array) for this. -- Mattias --|-Original Message- --|From: Narciso Miguel Rodrigues --|[mailto:[EMAIL PROTECTED]] --|Sent: Wednesday, February 05, 2003 02:03 --|To: [EMAIL PROTECTED] --|Subject: [PHP] Array find a element

[PHP] Array find a element

2003-02-04 Thread Narciso Miguel Rodrigues
Is possible to do something like if ($username in $users) ... or i need to do a foreach($user){...} Thks [MsR] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array find a element

2003-02-04 Thread John W. Holmes
Is possible to do something like if ($username in $users) ... or i need to do a foreach($user){...} www.php.net/in_array www.php.net/array_search ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

[PHP] array of unknown elements and insert query

2003-02-03 Thread Sunfire
hi.. i have an array (not written in code yet) but it is from a multiple select listbox and i want to use the elements in the array in an insert query.. and dont know how that works... (i wont know how many elements there will be on the insert)..the array elements will need to be put in 1 field

Re: [PHP] array of unknown elements and insert query

2003-02-03 Thread Kevin Stone
- Original Message - From: Sunfire [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 1:15 PM Subject: [PHP] array of unknown elements and insert query hi.. i have an array (not written in code yet) but it is from a multiple select listbox and i want to use the elements

Re: [PHP] array of unknown elements and insert query

2003-02-03 Thread enediel
advice you somethig better Good luck Greetings Enediel Linux user 300141 Happy who can penetrate the secret causes of the things ¡Use Linux! - Original Message - From: Sunfire [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 12:15 PM Subject: [PHP] array of unknown

[PHP] array help please

2003-01-05 Thread John Fishworld
can someone give me a bit of help / walthrough the following for me ! this first bits is okay $mysql query1 result array[cityid][cityname] mysql query2 result array[cityid][cityname] now what i want to do is kick out any doubles in my array and resort them alphebetically by cityname ?! help !

Re: [PHP] array help please

2003-01-05 Thread David T-G
John, et al -- ...and then John Fishworld said... % % can someone give me a bit of help / walthrough the following for me ! Let's see if I can help. % this first bits is okay % $mysql query1 % result % array[cityid][cityname] % % mysql query2 % result % array[cityid][cityname] Are CityIDs

RE: [PHP] array help please

2003-01-05 Thread David Freeman
$mysql query1 result array[cityid][cityname] mysql query2 result array[cityid][cityname] now what i want to do is kick out any doubles in my array and resort them alphebetically by cityname ?! It's difficult to answer this question without knowing more about the context and

Re: [PHP] Re: loading a db table into a php array from mysql

2003-01-02 Thread Rick Widmer
% different ways of connecting tables with LEFT JOIN. USING( fieldname ) % connects the table being joined, with the table listed right before it, % using the same fieldname in both. The ON syntax allows you to use % differently named fields, and/or a different table. I still don't get what

Re: [PHP] Re: loading a db table into a php array from mysql

2003-01-02 Thread Rick Widmer
At 06:32 AM 1/1/03 -0500, David T-G wrote: I still don't get what a left or right or outer or inner join is... The reason I chose LEFT JOIN are: o You get better control over how the query is executed. o Values from the first table are returned even if there is no associated entry in the

Re: [PHP] Re: loading a db table into a php array from mysql

2003-01-01 Thread David T-G
Rick, et al -- ...and then Rick Widmer said... % % At 02:57 PM 12/31/02 -0500, David T-G wrote: % ...and then Tularis said... % % % % Usually, % % using mysql to handle your tables is *way* faster than letting php % % handle it. % % Yes, do as much as you can in the database. The people who

[PHP] loading a db table into a php array from mysql

2002-12-31 Thread David T-G
Hi, all -- I'm so far about knee-deep in my project where I'll be using php to talk to the mysql database and spit out my web pages. I wonder if I should be making individual calls to the database or loading a table into an array so that I can walk it without those calls. For instance, I have

[PHP] Re: loading a db table into a php array from mysql

2002-12-31 Thread Tularis
Usually, using mysql to handle your tables is *way* faster than letting php handle it. That's what it was made for, speed...! In your case, you could just do a complex join I think. That would give all results in one table, and you could just order that on scheduletime, and voila, you'd

Re: [PHP] Re: loading a db table into a php array from mysql

2002-12-31 Thread David T-G
Tularis, et al -- ...and then Tularis said... % % Usually, % using mysql to handle your tables is *way* faster than letting php % handle it. Hmmm... OK. But that's so many queries... Or is it?, he asks, reading farther. % % That's what it was made for, speed...! Well, yeah, I figured

[PHP] SUMMARY - Re: [PHP] Re: loading a db table into a php array from mysql

2002-12-31 Thread David T-G
Tularis, et al -- ...and then David T-G said... % % ...and then Tularis said... % % % % Usually, % % using mysql to handle your tables is *way* faster than letting php % % handle it. ... % % % % In your case, you could just do a complex join I think. That would give % % Ahhh... A new term.

Re: [PHP] Re: loading a db table into a php array from mysql

2002-12-31 Thread Rick Widmer
At 02:57 PM 12/31/02 -0500, David T-G wrote: ...and then Tularis said... % % Usually, % using mysql to handle your tables is *way* faster than letting php % handle it. Yes, do as much as you can in the database. The people who wrote it spent a lot of time trying to optimize it. % % In your

[PHP] Array

2002-12-16 Thread Mako Shark
I have an array I set up like this: $monthschedule = array(1 = Jan, 2 = Feb, 3 = Mar, 6 = Jun); When I try to access them, doing this: $r = $monthschedule[6]; nothing comes up ($r is blank). Any thoughts? There are missing elements (4,5,7-12) in $monthschedule.

Re: [PHP] Array

2002-12-16 Thread Jason Wong
On Tuesday 17 December 2002 01:43, Mako Shark wrote: I have an array I set up like this: $monthschedule = array(1 = Jan, 2 = Feb, 3 = Mar, 6 = Jun); When I try to access them, doing this: $r = $monthschedule[6]; nothing comes up ($r is blank). Any thoughts? There are missing elements

Re: [PHP] Array

2002-12-16 Thread Andy Turegano
What you have to do, at least I think, is you have to type: $r = $monthschedule[Jun]; That is what I think you have to do. The other way you did it was when you have a value-only array. On Mon, 16 Dec 2002, Mako Shark wrote: I have an array I set up like this: $monthschedule = array(1 =

RE: [PHP] Array

2002-12-16 Thread Quentin Bennett
)) { $c = $cell['value']; $k = $cell['key']; print (Key: $k; Value: $cBR); } } Quentin -Original Message- From: Andy Turegano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 17 December 2002 10:25 a.m. To: Mako Shark Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Array What you have

RE: [PHP] Array

2002-12-16 Thread Andy Turegano
PROTECTED]] Sent: Tuesday, 17 December 2002 10:25 a.m. To: Mako Shark Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Array What you have to do, at least I think, is you have to type: $r = $monthschedule[Jun]; That is what I think you have to do. The other way you did it was when you have a value

RE: [PHP] Array

2002-12-16 Thread Philip Olson
] Subject: Re: [PHP] Array What you have to do, at least I think, is you have to type: $r = $monthschedule[Jun]; That is what I think you have to do. The other way you did it was when you have a value-only array. On Mon, 16 Dec 2002, Mako Shark wrote: I have an array I set up

[PHP] array with session

2002-11-29 Thread Laurence
hello everyone, I'm trying to get some images value from a checkbox putting them in a session to preserve the data. The array works perfectly without the session_start() and session_register. can anyone help? html script html head title/title /head body form action=submit_information.php

Re: [PHP] array with session

2002-11-29 Thread Justin French
Are you on PHP = 4.1 ? Try this: ? session_start(); print_r($_POST['Image']); // should print out your //checkbox array $_SESSION['Image'] = $_POST['Image']; // instead of session register print_r($_SESSION['Image']);// should

Re: [PHP] array manipulations

2002-11-26 Thread Marek Kilimajer
if all you might have there is 'error', try if(array_search('error',$array) === FALSE) { echo 'not ok'; } if you might have different strings, do $result='ok'; foreach($array as $v) { if($v) { $result ='not ok'; break; } } Mattia wrote: Can anyone suggest an ELEGANT way

[PHP] array manipulations

2002-11-26 Thread Mattia Wow
Wow this was really elegant!! thank you!! :-) if (0 strlen(implode('',$a))) { // error } Stas - Per te Blu American Express è gratis

[PHP] array manipulations

2002-11-25 Thread Mattia
Can anyone suggest an ELEGANT way to find out if an array is made of empty strings or not? example $a = Array( '' , '' , '' ); //ok $b = Array( '' , '' , 'error' ); // not ok $c = Array( 'error' , '' , 'error' ); // not ok tia Mattia -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] array manipulations

2002-11-25 Thread DL Neil
Mattia, Can anyone suggest an ELEGANT way to find out if an array is made of empty strings or not? example $a = Array( '' , '' , '' ); //ok $b = Array( '' , '' , 'error' ); // not ok $c = Array( 'error' , '' , 'error' ); // not ok implode() then check for nullstring/count characters.

[PHP] Array Searching

2002-11-15 Thread Thomas Weber
Hi, i have an array like: Array ( [1] = Array ( [alias] = foo ... ) [2] = Array ( [alias] = bar ... ) ... ) I need some way to find out, if an alias foo is in the array. Any idea how to do this? Thanks,

[PHP] array()

2002-11-05 Thread Francisco Vaucher
Hi people, is there a way to retrieve an array from a function ? like: ?php test_func($param1, $param2) { //code $test = array (ASD = Test1, ASDF = Test2); return $test; } //outiside de function echo $test; // - the array ? This doesn't work. So, any clue ? Regards and tks

Re: [PHP] array()

2002-11-05 Thread .: B i g D o g :.
Try this... $test_arr = test_func( $param1, $param2 ) echo $test_arr; On Tue, 2002-11-05 at 18:01, Francisco Vaucher wrote: Hi people, is there a way to retrieve an array from a function ? like: ?php test_func($param1, $param2) { //code $test = array (ASD = Test1, ASDF

Re: [PHP] array()

2002-11-05 Thread Khalid El-Kary
hi, this one worked well, but to print the array you must use print_r() instead of echo print_r($test); khalid _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Re: [PHP] array()

2002-11-05 Thread John Nichel
Ugh. Read the in the manual about variable scope, and how to call a function. It's all there. To get you started... print_r ( test_func() ); Francisco Vaucher wrote: Hi people, is there a way to retrieve an array from a function ? like: ?php test_func($param1, $param2) { //code

Re: [PHP] array()

2002-11-05 Thread Khalid El-Kary
sorry ... big said the right, but you must use print_r() if you want to print the array _ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp -- PHP General Mailing

Re: [PHP] array()

2002-11-05 Thread John Nichel
Part of the ugh thing is because I'm having a crappy day. However, the main part of the ugh thing is because of people not doing any research before posting a question here. It has nothing to do with my wanting to answer the question or not, I enjoy helping out here, and I have gotten

RE: [PHP] array()

2002-11-05 Thread Francisco Vaucher
mailto:fvaucher;tycoint.com -Mensaje original- De: John Nichel [mailto:jnichel;by-tor.com] Enviado el: martes, 05 de noviembre de 2002 15:20 Para: Francisco Vaucher CC: [EMAIL PROTECTED] Asunto: Re: [PHP] array() Part of the ugh thing is because I'm having a crappy day. However

Re: [PHP] array()

2002-11-05 Thread John Nichel
mailto:fvaucher;tycoint.com -Mensaje original- De: John Nichel [mailto:jnichel;by-tor.com] Enviado el: martes, 05 de noviembre de 2002 15:20 Para: Francisco Vaucher CC: [EMAIL PROTECTED] Asunto: Re: [PHP] array() Part of the ugh thing is because I'm having a crappy day. However

[PHP] Array solution...

2002-11-01 Thread Davíð Örn Jóhannsson
I have two arrays and I have complete list of numbers in one of them, lets call it $complete[] and another that has some values of the complete one, lets call that one $part[], now if I want to return an array with all the values that are in $complete[] but not in $part[], how would I do that?

Re: [PHP] Array solution...

2002-11-01 Thread Jason Wong
On Friday 01 November 2002 19:22, Davíð Örn Jóhannsson wrote: I have two arrays and I have complete list of numbers in one of them, lets call it $complete[] and another that has some values of the complete one, lets call that one $part[], now if I want to return an array with all the values

<    4   5   6   7   8   9   10   11   12   13   >