Re: [PHP] Array question

2003-09-27 Thread Jackson Miller
On Saturday 27 September 2003 11:18, Robin Kopetzky wrote: > Good morning all!! > > Can you nest an array within an array?? > > Example: $paArgs['aCheckBoxes[$iIndex]['sName']'] Yes, but like this $array['aCheckBoxes'][] = $iIndex['sName'] This means: $array is an array aCheckBoxes is a item in $

Re: [PHP] Array question

2003-09-27 Thread Robert Cummings
On Sat, 2003-09-27 at 12:18, Robin Kopetzky wrote: > Good morning all!! > > Can you nest an array within an array?? > > Example: $paArgs['aCheckBoxes[$iIndex]['sName']'] You mean can you retrieve an array entry by giving a key defined by a value in another array? To do so remove the outer quotes

[PHP] Array question

2003-09-27 Thread Robin Kopetzky
Good morning all!! Can you nest an array within an array?? Example: $paArgs['aCheckBoxes[$iIndex]['sName']'] Thank you in advance. Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] How to do Javascript for the HTML/PHP Array (See Below)

2003-09-17 Thread Scott Fletcher
... Scott F. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > if f = your form then f.elements['MyArray[]'] is a javascript array of > input elements. > > Scott Fletcher wrote: > > > Hi Fellas! > > > > Here'

Re: [PHP] How to do Javascript for the HTML/PHP Array (See Below)

2003-09-17 Thread Marek Kilimajer
if f = your form then f.elements['MyArray[]'] is a javascript array of input elements. Scott Fletcher wrote: Hi Fellas! Here's the clipping of an article about putting HTML variables into a PHP Array upon submission. Right now, I'm having trouble getting Javasc

[PHP] How to do Javascript for the HTML/PHP Array (See Below)

2003-09-17 Thread Scott Fletcher
Hi Fellas! Here's the clipping of an article about putting HTML variables into a PHP Array upon submission. Right now, I'm having trouble getting Javascript to do the error checking of each of the HTML variable if it's variable name is treated as an array. Anyone know of a w

Re: [PHP] array encapsulate

2003-09-12 Thread John W. Holmes
Bill wrote: How do I know it won't just assume that $_POST["detail"][11][116] means the 116th character in the string $_POST["detail"][11]? Because $_POST['detail'][11] is an array (or it should be). If you're in doubt, make sure it is with is_array(). -- ---John Holmes... Amazon Wishlist: www.a

Re: [PHP] array encapsulate

2003-09-12 Thread Bill
How do I know it won't just assume that $_POST["detail"][11][116] means the 116th character in the string $_POST["detail"][11]? "Larry E . Ullman" wrote: > > if ($_POST["detail"][11][116] && !$_POST["detailtext"][19][114]) { > > > > How can I encapsulate the array so it is a multi-dimensional ar

Re: [PHP] array encapsulate

2003-09-12 Thread Larry E . Ullman
if ($_POST["detail"][11][116] && !$_POST["detailtext"][19][114]) { How can I encapsulate the array so it is a multi-dimensional array and not just a string length? I'm not exactly sure what you're array structure is but that syntax is correct. $_POST['key1']['key2']... Larry -- PHP General Mai

[PHP] array encapsulate

2003-09-12 Thread Bill
I'd like to do this, but it produces an error: if ($_POST{["detail"][11][116]} && !$_POST{["detailtext"][19][114]}) { so I'm left doing this if ($_POST["detail"][11][116] && !$_POST["detailtext"][19][114]) { How can I encapsulate the array so it is a multi-dimensional array and not just a strin

Re: [PHP] Array Push and Keys

2003-08-29 Thread David Otton
On Fri, 29 Aug 2003 11:18:18 -0400, you wrote: >The question for anyone out there is simple - does array_push allow you to >push key=>value pairs? That is what is causing errors - nothing else, >everything else is a result of inherited systems, and other developers >crappy design. I agree with y

Re: [PHP] Array Push and Keys

2003-08-29 Thread Ernest E Vogelsinger
At 00:14 29.08.2003, Mike Morton said: [snip] > >I am trying to loop through some database results to build an array similar >to: > >Array ( >[33]=>Array ( >[usa]=>52.00 >[sa]=>553.00 >) >) > >And the problem that I am having is that a

Re: [PHP] Array Push and Keys

2003-08-29 Thread Mike Morton
The code that I ended up using was: $res=mysql_query("select distinct dealercode from transactions where dealercode!='' order by dealercode",$intranet); $count=0; while($row=mysql_fetch_array($res)) { $amt=mysql_query("select sum(amount) as total from transactions where date between '2003-04-0

Re: [PHP] Array Push and Keys

2003-08-29 Thread John W. Holmes
Ford, Mike [LSS] wrote: Having said that, I've just given you a clue: since array_push($array, $var) is equivalent to $array[] = $var, you can get the result you want by doing: $array[] = array($k, $v); (with, of course, appropriate values for $array, $k and $v substituted to suit your code!).

RE: [PHP] Array Push and Keys

2003-08-29 Thread Ford, Mike [LSS]
-Original Message- From: Mike Morton To: David Otton Look - David - I do appreciate your efforts to help - and I realize that working blind on an email list is tough, but the question is not about the structure of the code, the database, reserved words or anything else. The question for a

Re: [PHP] Array Push and Keys

2003-08-29 Thread Mike Morton
And as a follow up, from the phpbuilder list where I posted the very same question today, I think this answers the question: "I don't think its a bug. I think the problem you're having is to do with what type of argument you can give to array_push. There are two possibilities ... 1) variable 2)

Re: [PHP] Array Push and Keys

2003-08-29 Thread Mike Morton
Look - David - I do appreciate your efforts to help - and I realize that working blind on an email list is tough, but the question is not about the structure of the code, the database, reserved words or anything else. The question for anyone out there is simple - does array_push allow you to push

Re: [PHP] Array Push and Keys

2003-08-29 Thread David Otton
On Fri, 29 Aug 2003 07:54:45 -0400, you wrote: >Correct on the brackets - but not on the results still working... The code >I had in the email was just a sample - here is the real code... Ack. For anyone watching, if you have a problem please post a minimal code snippet that illustrates the prob

Re: [PHP] Array Push and Keys

2003-08-29 Thread Mike Morton
Correct on the brackets - but not on the results still working... The code I had in the email was just a sample - here is the real code... $res=mysql_query("select distinct dealercode from transactions order by dealercode",$intranet); $transactions=Array(); while($row=mysql_fetch_array($res)) {

Re: [PHP] Array Push and Keys

2003-08-29 Thread David Otton
On Thu, 28 Aug 2003 18:14:39 -0400, you wrote: >While($row=mysql_fetch_array($res) { >That *should* create the array above, but as I mentioned array_push does not >seem to be taking the keys I just get a Parse error message for the >line. (the first array_push) Ahem. Count the brackets? :)

[PHP] Array Push and Keys

2003-08-28 Thread Mike Morton
I am trying to loop through some database results to build an array similar to: Array ( [33]=>Array ( [usa]=>52.00 [sa]=>553.00 ) ) And the problem that I am having is that array_push does not want to take keys when I am using it. My Code: $transactions=Array(); While($r

RE: [PHP] Array element from function return

2003-08-24 Thread Wouter van Vliet
Holmes [mailto:[EMAIL PROTECTED] -> Verzonden: zondag 24 augustus 2003 17:34 -> Aan: Wouter van Vliet -> CC: PHP General -> Onderwerp: Re: [PHP] Array element from function return -> -> -> Wouter van Vliet wrote: -> -> > I'm trying to get the first elem

Re: [PHP] Array element from function return

2003-08-24 Thread John W. Holmes
Wouter van Vliet wrote: I'm trying to get the first element of a value returned by a function .. == example == function return_Array() { return ('one', 'zwei', 'kolm', 'vier'); } print return_Array()[0]; ==/ example == Now i'd like this script to print 'one' for me .. can it be done witho

[PHP] Array element from function return

2003-08-24 Thread Wouter van Vliet
Hi, I'm trying to get the first element of a value returned by a function .. == example == function return_Array() { return ('one', 'zwei', 'kolm', 'vier'); } print return_Array()[0]; ==/ example == Now i'd like this script to print 'one' for me .. can it be done without creating a temp

Re: [PHP] array method attributes (OO)

2003-08-14 Thread Ben Edwards
array $SESSION; near the beginning gives the error Parse error: parse error, unexpected T_ARRAY, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in d:\wwwroot\stwerburghs.org\obj\contacts.obj.php on line 6 Fatal error: Cannot instantiate non-existent class: contacts in d:\wwwroot\stwerb

[PHP] Array to List

2003-08-14 Thread James Johnson
Hello, Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. I'm building a list from an array with the following code, but it puts a trailing "," and I need to remove it. $campusList = ""; foreach ($_PO

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
TED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List > Coming from ColdFusion, this is difficult. CF has an ArrayToList() > function. I can't find anything similar in PHP. implode(); > I'm building a list f

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
When I tried the $file_contents = explode(",",$file_contents); I get the error: Notice: Array to string conversion in c:\inetpub\wwwroot\webpage10\example\search\dsp_search.php on line 111 When I do echo ($file_contents); the output is Array. When I do echo ($file_contents[0]); I get all t

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
You where right. I realized this a bit after I posted. I got it going once I realized what I had forgotten. thanks everyone for your input "Liam Gibbs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I get all the content of file, so everything is in array 0. I need to > > som

[PHP] array looping

2003-08-14 Thread Micah Montoy
I have this text file that I pull in and I need to transverse through the file and assign each value in the file into an array. The text in the file is separated by a comma. I was thinking of something along the lines of explode but its only for strings and I couldn't get it to work with arrays.

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
No, one long file. I can separate it out any way though. Any ideas? "Chris W. Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Micah Montoy on Tuesday, August 12, 2003 3:35 PM said: > I have this text file that I pull in and I need to transvers

Re: [PHP] array looping

2003-08-14 Thread Liam Gibbs
> I get all the content of file, so everything is in array 0. I need to > somehow break up the array by the comma. Wouldn't it be $file_contents = explode(",", $file_contents[0]); as in you've forgotten the array element? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] array method attributes (OO)

2003-08-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 8 Aug 2003 at 14:18, lines prefixed by '>' were originally written by you. > I wish to pass a session variable into an object and have it available > as > an attribute. I have what I thought I needed below as a code segment > but > it dou

Re: [PHP] Array to List

2003-08-14 Thread CPT John W. Holmes
From: "James Johnson" <[EMAIL PROTECTED]> > Actually, I'm using $campusList for a SQL statement: > > SELECT name FROM campuses WHERE inst_id IN ('$campusList'); > > It wasn't working until I found out that $campusList needs to look like > '1','2','3'. > > $campusList = implode( ', ', $_POST['campu

[PHP] array method attributes (OO)

2003-08-14 Thread Ben Edwards
I wish to pass a session variable into an object and have it available as an attribute. I have what I thought I needed below as a code segment but it douse no work. Has anybody got any idea how I should achieve this. Ben .. class Contacts{ var $db; array $SESSION;

RE: [PHP] array looping

2003-08-14 Thread Chris W. Parker
Micah Montoy on Tuesday, August 12, 2003 3:35 PM said: > I have this text file that I pull in and I need to transverse through > the file and assign each value in the file into an array. Hehe... you mean traverse. Transverse: 1 : acting, lying, or being across : se

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
lto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:42 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Everything is fine in your script up to here: > $row_GetCampuses = mysql_fetch_assoc($GetCampuses); The above is getting just one (1) record from the database. If you

Re: [PHP] Array to List

2003-08-14 Thread Jim Lucas
on page one do this instead. Jim Lucas - Original Message - From: "James Johnson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 11, 2003 1:29 PM Subject: RE: [PHP] Array to List > All, > > Thanks for your help, but this shouldn'

Re: [PHP] Array to List

2003-08-14 Thread Chris Boget
Everything is fine in your script up to here: > $row_GetCampuses = mysql_fetch_assoc($GetCampuses); The above is getting just one (1) record from the database. If you ever have only one, you are good to go. > $totalRows_GetCampuses = mysql_num_rows($GetCampuses); I'm not sure what you are doin

Re: [PHP] Array to List

2003-08-11 Thread Chris Boget
> Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. > I can't find anything similar in PHP. implode(); > I'm building a list from an array with the following code, but it puts a > trailing "," and I need to remove it. [snip] $campusList = implode( ', ', $_POST['campus

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
d it to "SELECT name..." James -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:32 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List on page one do this instead. Jim Lucas - Original Message - From

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
27;m going about this the wrong way. Any advice or suggestions would be appreciated. Thanks, James -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:12 PM To: James Johnson; 'Chris Boget'; [EMAIL PROTECTED] Subject: Re: [PHP]

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
Chris, thanks that works perfectly -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List > Coming from ColdFusion, this is difficult. CF has an ArrayToL

Re: [PHP] Array to List

2003-08-11 Thread Curt Zirzow
* Thus wrote James Johnson ([EMAIL PROTECTED]): > Hello, > > Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. > I can't find anything similar in PHP. > > I'm building a list from an array with the following code, but it puts a > trailing "," and I need to remove it. >

Re: [PHP] array method attributes (OO)

2003-08-09 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 8 Aug 2003 at 15:54, lines prefixed by '>' were originally written by you. > array $SESSION; near the beginning gives the error > Parse error: parse error, unexpected T_ARRAY, expecting T_OLD_FUNCTION > or > T_FUNCTION or T_VAR or '}' in >

Re: [PHP] Array transform date and put in a session

2003-07-29 Thread John W. Holmes
Frank Keessen wrote: I've got a form with a field called datebirth[]; After submitting the form; it must put the datebirth field (or fields) into the mysql format -mm-dd and after that put it in a session: $date_array = split("-", $_POST['datebirth']); $mysqldate = $date_array[2]."-".$date_ar

Re: [PHP] Array transform date and put in a session

2003-07-29 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 22:15, lines prefixed by '>' were originally written by you. > Hi David, > Thanks for your reply... This makes no sense; > According to the rest of your code, it should be called datebirth, > not datebirth[]. > Let me put in

Re: [PHP] Array transform date and put in a session

2003-07-29 Thread Frank Keessen
ot; <[EMAIL PROTECTED]> To: "Frank Keessen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 11:02 PM Subject: Re: [PHP] Array transform date and put in a session Hello, This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 21:42, lin

Re: [PHP] Array transform date and put in a session

2003-07-29 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 21:42, lines prefixed by '>' were originally written by you. > Hi All, > Can you please help me with the following: > I've got a form with a field called datebirth[]; According to the rest of your code, it should be called

[PHP] Array transform date and put in a session

2003-07-29 Thread Frank Keessen
Hi All, Can you please help me with the following: I've got a form with a field called datebirth[]; After submitting the form; it must put the datebirth field (or fields) into the mysql format -mm-dd and after that put it in a session: $date_array = split("-", $_POST['datebirth']); $mysqld

Re: [PHP] Array Question

2003-07-28 Thread Jim Lucas
Try this. $companyname[] = $row['company']; Jim Lucas - Original Message - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 10:16 AM Subject: [PHP] Array Question hello everyone, I am trying t

[PHP] Array Question

2003-07-28 Thread Pushpinder Singh Garcha
hello everyone, I am trying to store one of the fields of the resultset into an array as I display the results. while ($row = mysql_fetch_array($result1)) { // Alternate the bgcolor of each row for visibility ($even % 2) == 0 ? $bgcolor = "#EFEFEF" : $bgcolor = "#eefff

Re: [PHP] Array help

2003-07-28 Thread skate
>because in reality I don't have just these 4 fields > but 43 fields in one table that have to be taken. "Select *..." seems a much > easier way to get it > you have 43 fields in 1 table? if you are seriously considering offering hosting packages, then i'm guessing your wanting to be half prof

Re: [PHP] Array help

2003-07-27 Thread Jason Wong
On Monday 28 July 2003 10:19, Ryan A wrote: > After asking for help on the list Skate gave me the following code as an > example: > ** > $n = 0; > $result = mysql_query( "SELECT id, title, text, date FROM news ORDER BY > date DESC" ); > while ($rows = mysql_fetch_array($result)) { >

[PHP] Array help

2003-07-27 Thread Ryan A
Hi, After asking for help on the list Skate gave me the following code as an example: ** $n = 0; $result = mysql_query( "SELECT id, title, text, date FROM news ORDER BY date DESC" ); while ($rows = mysql_fetch_array($result)) { if( $rows == "" ){ continue; } extract( $rows ); //

Re: [PHP] ARRAY QUESTION

2003-07-24 Thread Curt Zirzow
* Thus wrote Dale Hersh ([EMAIL PROTECTED]): > I have a question regarding the count function. Here goes: > > Lets pretend I have this array called myStuff. If I add two elements to > myStuff and call the count function, I will get a result of 2. My question > is how do I re-initialize the array a

RE: [PHP] ARRAY QUESTION

2003-07-24 Thread Chris W. Parker
Dale Hersh on Thursday, July 24, 2003 12:41 PM said: > Lets pretend I have this array called myStuff. If I add two elements > to myStuff and call the count function, I will get a result of 2. My > question is how do I re-initialize the array after adding elements so

RE: [PHP] ARRAY QUESTION

2003-07-24 Thread Jay Blanchard
[snip] Lets pretend I have this array called myStuff. If I add two elements to myStuff and call the count function, I will get a result of 2. My question is how do I re-initialize the array after adding elements so when I call the count function on the array, I get a result of 0. [/snip] If you ad

[PHP] ARRAY QUESTION

2003-07-24 Thread Dale Hersh
I have a question regarding the count function. Here goes: Lets pretend I have this array called myStuff. If I add two elements to myStuff and call the count function, I will get a result of 2. My question is how do I re-initialize the array after adding elements so when I call the count function

Re: [PHP] Array Simplification

2003-07-22 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]): > I've got a nested array below that I'm having some trouble simplyfing. > Here is an example of how the array is now: > > [...] > > Array > ( > [0] => Array > ( > [0] => 2003-06-10 17:00:00 > [1] => 9054.89 >

RE: [PHP] Array Simplification

2003-07-22 Thread Chris W. Parker
jwulff on Tuesday, July 22, 2003 3:58 PM said: > I've got a nested array below that I'm having some trouble simplyfing. > Here is an example of how the array is now: [snip] How are you creating the array in the first place? c. -- PHP General Mailing List (http:

[PHP] Array Simplification

2003-07-22 Thread jwulff
I've got a nested array below that I'm having some trouble simplyfing. Here is an example of how the array is now: Array ( [0] => Array ( [0] => 2003-06-10 17:00:00 [1] => 9054.89 ) [1] => Array ( [0] => 2003-06-10 17:00:00

RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
ilto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 11:25 AM > To: Dan Joseph > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Array Sorting, 2 items... > > > Your array seems like a result of mysql_fetch_array(), cannot you order > it in the sql query? > > Dan Joseph wrote:

RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
ideas? -Dan Joseph > -Original Message- > From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 11:39 AM > To: 'Dan Joseph'; [EMAIL PROTECTED] > Subject: RE: [PHP] Array Sorting, 2 items... > > > > -Original Message- &g

Re: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Curt Zirzow
* Thus wrote Dan Joseph ([EMAIL PROTECTED]): > Eek... Yes, I did past it wrong... > > SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS > loan_id, cust_info.first_name, cust_info.last_name, > transactions.approved_date, payment_types.type FROM loan_info, cust_info, > transact

RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
nything wrong with that? Shouldn't that give me the sort I'm looking for without having to do a usort? -Dan Joseph > -Original Message- > From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 11:39 AM > To: 'Dan Joseph'; [EMAIL PROTECTE

RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Ford, Mike [LSS]
> -Original Message- > From: Dan Joseph [mailto:[EMAIL PROTECTED] > Sent: 22 July 2003 16:29 > > Yeah, I did get it from a mysql_fetch_array(). I have: > > ORDER BY > payment_methods.ba_type ASC, > loan_info.loan_number ASC > > H

RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
;) GROUP BY loan_info.id ORDER BY loan_info.loan_number ASC Maybe I'm doing something wrong there? -Dan Joseph > -Original Message- > From: Marek Kilimajer [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 11:25 AM > To: Dan Joseph > Cc: [EMAIL PROTECTED]

Re: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Marek Kilimajer
Your array seems like a result of mysql_fetch_array(), cannot you order it in the sql query? Dan Joseph wrote: Array ( [0] => Array ( [0] => CHECKING [ba_type] => CHECKING [1] => 10132200 [loan_number] => 10132200 Keep e

[PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Hi, Trying to accomplish: I want to sort my array by two columns. The array is setup: Array ( [0] => Array ( [0] => CHECKING [ba_type] => CHECKING [1] => 10132200 [loan_number] => 10132200 [2

Re: [PHP] Array cookie

2003-07-22 Thread Curt Zirzow
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]): > * Thus wrote Shantanu Oak ([EMAIL PROTECTED]): > > Hi, > > I have written a feed reader for my personal use. The > > php code given below does work. But it works only with > > a single feed. How can I save multiple cookies > > (array?) and display a

Re: [PHP] Array cookie

2003-07-22 Thread Jacob Vennervald Madsen
You could serialize your an array and save it in the cookie, but I would also recommend using a session and then save the serialized array in this instead. Jacob Vennervald On Tue, 2003-07-22 at 09:36, Curt Zirzow wrote: > * Thus wrote Shantanu Oak ([EMAIL PROTECTED]): > > Hi, > > I have written

Re: [PHP] Array cookie

2003-07-22 Thread Curt Zirzow
* Thus wrote Shantanu Oak ([EMAIL PROTECTED]): > Hi, > I have written a feed reader for my personal use. The > php code given below does work. But it works only with > a single feed. How can I save multiple cookies > (array?) and display a few more RSS feeds. The example > page can be found at...

[PHP] Array cookie

2003-07-21 Thread Shantanu Oak
Hi, I have written a feed reader for my personal use. The php code given below does work. But it works only with a single feed. How can I save multiple cookies (array?) and display a few more RSS feeds. The example page can be found at... http://shantanuoak.com/test1.php &align=left&width=300&f

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Curt Zirzow
Evan Nemerson <[EMAIL PROTECTED]> wrote: > I kinda skimmed, but I think what you want is > > foreach ( array_keys($SAVEVARS) as $key ) > $query = "update table set $key=$SAVEVARS[$key];"; > should be: $query = "update table set $key='{$SAVEVARS[$key]}';"; -- PHP General Mailing List (h

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Lars Torben Wilson
On Thu, 2003-07-17 at 14:38, Mike Morton wrote: > Perhaps I was not that clear on the subject :) > > I have the following array: > > $SAVEVARS[headerimage]=$_POST[headerimage]; > $SAVEVARS[backgroundimage]=$_POST[backgroundimage]; > > I want to iterate through it to save to a database config: >

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Chris Shiflett
--- Mike Morton <[EMAIL PROTECTED]> wrote: > Forach($SAVEVARS as $whatever) { > $query="update table set $whatever=$whatever[$whatever]"; > } Use braces: $query = "update table set $whatever = '{$whatever[$whatever]}'"; Chris = Become a better Web developer with the HTTP Developer's Han

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Evan Nemerson
I kinda skimmed, but I think what you want is foreach ( array_keys($SAVEVARS) as $key ) $query = "update table set $key=$SAVEVARS[$key];"; On Thursday 17 July 2003 02:38 pm, Mike Morton wrote: > Perhaps I was not that clear on the subject :) > > I have the following array: > > $SAVEVARS

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Matt Matijevich
The question is the - the assigned string key - is there a way to retrieve that in a loop? Foreach, for, while or otherwise? I think this is what you want. http://www.php.net/manual/en/control-structures.foreach.php foreach(array_expression as $value) statement foreach(array_expression as $ke

[PHP] Array key names - can they be called as strings?

2003-07-17 Thread Mike Morton
Perhaps I was not that clear on the subject :) I have the following array: $SAVEVARS[headerimage]=$_POST[headerimage]; $SAVEVARS[backgroundimage]=$_POST[backgroundimage]; I want to iterate through it to save to a database config: Forach($SAVEVARS as $whatever) { $query="update table set $wh

[PHP] Array Dump

2003-06-27 Thread Daniel J. Rychlik
Hmm, I just noticed that array dump counts the number of charaters and white space and lables that number string... What function name is that ? The string counter I mean ? -Dan

RE: [PHP] Re:[PHP] Array Info

2003-06-26 Thread Ford, Mike [LSS]
> -Original Message- > From: Haseeb [mailto:[EMAIL PROTECTED] > Sent: 26 June 2001 22:56 > > ps. sprry for beaking thread but i am not subscribed to any > news server.using outlook exp and don't know how to configure it. At least configure your system's clock, please -- it's currently 2

[PHP] Re:[PHP] Array Info

2003-06-26 Thread Haseeb
Hi, from the array i asume that you are trying to make a tree structure like this Data_Array { Mar-99 { 0, 0, 5945, 33, 0 } } Second you said that you want to make variables out

[PHP] Array Info

2003-06-25 Thread John Wulff
I need some information about an array structured as follows: $example_data = array( array("Mar-99",0,0,5945.33,0), array("Feb-99",0,0,47648.90,0), array("Jan-99",0,0,13365.52,0) ); I need to know the largest number in the array. I need to know how many sets of numbers there are, ie how many comma

Re: [PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
Marek Kilimajer wrote: BTW, this is what I always receive when mailing you: Diagnostic-Code: SMTP; 554 5.7.1 Original message rejected due to high SPAM score: 97.4 Hrm, yes. Has to do with your .sk domain I'm sure. Bloody automatic filters. Thanks for the function, it works as expected

Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
BTW, this is what I always receive when mailing you: Final-Recipient: RFC822; [EMAIL PROTECTED] Action: failed Status: 5.7.1 Remote-MTA: DNS; serpico.pcraft.com Diagnostic-Code: SMTP; 554 5.7.1 Original message rejected due to high SPAM score: 97.4 Last-Attempt-Date: Thu, 19 Jun 2003 11:36:23 +02

Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
Yes, simply don't return 0 when the manufacturers are equal, but continue with other checks: function cmp ($a, $b) { if ($a['cat'] == $b['cat']) { // return 0; -- not anymore, but go on to compare manuf. if ($a['manufacturer'] == $b['manufacturer']) { if ($a['titl

Re: [PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
Marek Kilimajer wrote: Use usort. This function should do the work: Hey thanks! That worked like a charm, once I figured out that making the comparison < instead of > I would get an ascending sort instead of the descending one. Now, can I do multiple sorts? Like, sort on "cat" first, "man

Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
Use usort. This function should do the work: function cmp ($a, $b) { if ($a['manufacturer'] == $b['manufacturer']) return 0; return ($a['manufacturer'] > $b['manufacturer']) ? -1 : 1; } Ashley M. Kirchner wrote: I have an array that looks like this: $i = 0; $item[$i] = array( 'link'

[PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
I have an array that looks like this: $i = 0; $item[$i] = array( 'link' => 'http://...', 'image' => '/images/image.jpg', 'title' => 'some title', 'price' => '$14.00', 'cat'=> 'Frames', 'author' =>

RE: [PHP] Array in a $_session

2003-06-17 Thread fkeessen
Dear all, Finnaly managed it (it's working! :>)... But can you check if this is the way? (step1.php) > Reiziger Voorletters "; ?> (STEP4.PHP) '; ?> Regards, Frank >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: 17 June

RE: [PHP] Array in a $_session

2003-06-17 Thread Ford, Mike [LSS]
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 17 June 2003 07:48 > > Maybe you can make it a little bit clear for me? > > >You have not defined $i, so what did you expect to see here? > > >> session_start(); > >> $aantalpers=$_SESSION["aantalpers"]; > >

Re: [PHP] Array in a $_session

2003-06-17 Thread Jason Wong
On Tuesday 17 June 2003 14:48, [EMAIL PROTECTED] wrote: > Maybe you can make it a little bit clear for me? I can't because I don't know what you're trying to do. I can only point out what I see [to me] are obvious mistakes. > >You have not defined $i, so what did you expect to see here? > > > >

Re: [PHP] Array in a $_session

2003-06-16 Thread fkeessen
Hi Jason, Maybe you can make it a little bit clear for me? >You have not defined $i, so what did you expect to see here? >> session_start(); >> $aantalpers=$_SESSION["aantalpers"]; >> $test1 = $_SESSION['test1'][$i]; > So is it going to be: $test1[$i ]= $_SESSION['test1'][$i]; ??? Regards, F

Re: [PHP] Array in a $_session

2003-06-16 Thread Jason Wong
On Tuesday 17 June 2003 13:23, Frank Keessen wrote: > (step 3.php) > session_start(); > $aantalpers=$_SESSION["aantalpers"]; > $test1 = $_SESSION['test1'][$i]; You have not defined $i, so what did you expect to see here? > echo $test1; > for ($i=1; $i<=$_SESSION['test1'][$i]; $i++) > { > e

Re: [PHP] Array in a $_session

2003-06-16 Thread Frank Keessen
Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "Frank Keessen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, June 17, 2003 4:06 AM Subject: Re: [PHP] Array in a $_session > Frank Keessen wrote: > > > Hi

Re: [PHP] Array in a $_session

2003-06-16 Thread John W. Holmes
Frank Keessen wrote: Hi jason & the rest, Dit the session_write_close()! Nothing still displayed in step3, more thoughts?? $_REQUEST["submit"]=isset($_REQUEST["submit"])?$_REQUEST["submit"]:""; if($_REQUEST['submit']!="") { foreach($_POST['test1'] as $i => $Value) { $_SESSION['test1'][$i] = $_POS

Re: [PHP] Array in a $_session

2003-06-16 Thread Frank Keessen
($i=1; $i<=$_SESSION['test1'][$i]; $i++) { echo $test1; } Frank - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 16, 2003 11:58 PM Subject: Re: [PHP] Array in a $_session > On Tuesday 17 June 2003

Re: [PHP] Array in a $_session

2003-06-16 Thread Jason Wong
On Tuesday 17 June 2003 05:43, Frank Keessen wrote: > Thanks but nothing is displayed on page 3 Any thoughts??? > > (page 2) > > $_REQUEST["submit"]=isset($_REQUEST["submit"])?$_REQUEST["submit"]:""; > if($_REQUEST['submit']!="") > { > foreach($_POST['test1'] as $i => $Value) { > $_SESSION['te

Re: [PHP] Array in a $_session

2003-06-16 Thread Frank Keessen
e! Frank - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "Frank Keessen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, June 16, 2003 11:34 PM Subject: Re: [PHP] Array in a $_session > Frank Keessen wrote: > &

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