Re: [PHP] Array keys referencing value from another array key???

2004-06-06 Thread Marek Kilimajer
Gerard Samuel wrote: Not sure if the subject was worded correctly, but I was looking to see if this (or something like it) is possible. $array = array('key_1' = 'This is some text', 'key_2' = 'b' . $array['key_1'] . '/b' ); And the array structure

[PHP] array key starting with digit ending with string

2004-05-27 Thread Larry Brown
I have an unusual situation where I have to communicate with an MS based soap server. They have named one of their variables with a name leading with a 1 such as 1variable. Nusoap loads the variable descriptions from the wsdl document and compares the variable names I am trying to send with the

Re: [PHP] array key starting with digit ending with string

2004-05-27 Thread Matt Matijevich
[snip] if($data[$currentVarNameInCycle]) { do something } Is there some way force the recognition of the key when it leads with a digit? [/snip] not sure I follow 100% but you could use a regular expression to detemine if it starts with a string. if (preg_match('/^\d/',$array_key)) {

Re: [PHP] array key starting with digit ending with string

2004-05-27 Thread Matt Matijevich
[snip] not sure I follow 100% but you could use a regular expression to detemine if it starts with a string. if (preg_match('/^\d/',$array_key)) { //do something } [/snip] I mean starts with a digit, sorry for 2 emails. I should proofread. -- PHP General Mailing List (http://www.php.net/) To

[PHP] Array Question

2004-05-02 Thread Jason Williard
I am using the following array and function in the template for my website. It works great, but I want to to be better. I would to make it so the last item displayed looks differently than the others, but I have been unable to figure out how to distinguish the last item. When displayed, the

Re: [PHP] Array Problem

2004-04-18 Thread Don Read
On 16-Apr-2004 Flavio Fontana wrote: Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob $a =

[PHP] Array Sorting Headaches

2004-04-18 Thread Burhan Khalid
Greetings everyone : Having a hard time with this one. I have a multi-dim array $foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data : Array ( [$x] = Array ( [0] = Array ( [invoiceid] = 11842

[PHP] Array Problem

2004-04-17 Thread Flavio Fontana
Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob thx Flavio -- PHP General Mailing List

Re: [PHP] Array Problem

2004-04-17 Thread Richard Harb
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } HTH Richard Friday, April 16, 2004, 11:00:49 PM, you wrote: Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1

Re: [PHP] Array Problem

2004-04-17 Thread Arthur Radulescu
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } If I remember well strlen is used for checking the length of a string... Arthur Looking for a job!? Use the

Re: [PHP] Array Problem

2004-04-17 Thread Daniel Clark
How about count() That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } HTH Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array Problem

2004-04-17 Thread Richard Harb
Saturday, April 17, 2004, 7:38:46 PM, Arthur Radulescu wrote: That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } If I remember well strlen is used for checking the length of a string... It does ... I didn't look

Re: [PHP] Array Problem

2004-04-17 Thread Tom Rogers
Hi, Saturday, April 17, 2004, 7:00:49 AM, you wrote: FF Hi FF I have i Problem i got a variable a=2351 now i need to create an array out of this variable FF a[0]=1 FF a[1]=3 FF a[2]=5 FF a[3]=1 FF I have an idea to use the modulo function an do some Math but FF im sure there is a nicer way of

Re: [PHP] Array problem

2004-03-22 Thread Firman Wandayandi
. = $columntotals[$count] = $sum; Is right? Sorry, I confuse with your words total of totals? Good Luck, Firman - Original Message - From: noginn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 22, 2004 12:33 AM Subject: [PHP] Array problem This has been confusing me a little

Re: [PHP] Array problem

2004-03-22 Thread noginn
should tried this one. = $columntotals[$count] = $sum; Is right? Sorry, I confuse with your words total of totals? Good Luck, Firman - Original Message - From: noginn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 22, 2004 12:33 AM Subject: [PHP] Array problem This has

[PHP] Array problem

2004-03-21 Thread noginn
This has been confusing me a little for a few hours now. Heres a snip of my code which is causing the problem: $content = table border='0' cellspacing='0' cellpadding='5'\n; $content .= tr\n; $content .= tdnbsp;/td\n; $tasks = new dbconnect; $tasks-connect();

Re: [PHP] array $_POST problem

2004-03-17 Thread Joey Kelly
On Tuesday 16 March 2004 12:16, thou spake: You're the Joey Kelly who runs the LUG in NoLA, yes? Yes, that's me. Have you been to one of our meetings lately? We redid our website recently: http://www.nolug.org Thanks for saying hi :-) snip Upon post, you need to get materials as such:

[PHP] Array to String conversion error

2004-03-16 Thread Alex Hogan
Hi All, I have a function that gets a single field from a mssql db. That field contains data that is then parsed out to represent a survey's results. The function; function quesresults(){ $query = SELECT sur_ans FROM au_survey; $result =

RE: [PHP] Array to String conversion error

2004-03-16 Thread Chris W. Parker
Alex Hogan mailto:[EMAIL PROTECTED] on Tuesday, March 16, 2004 9:48 AM said: $row = mssql_fetch_array($result); $thearray = explode('__', $row); - This is line 40 $row is an entire array. you don't explode an entire array, you only explode the contents of an

[PHP] array $_POST problem

2004-03-16 Thread Joey Kelly
Hello, I have a SuSE 9.0 Linux server running PHP and Apache2 (my phpinfo() data is at http://redfishnetworks.com/~jkelly/test.php), and my problem is this: I've got a sticky problem that I need to solve. I've just turned on register_globals in my PHP php.ini file, and therefore have to run my

Re: [PHP] array $_POST problem

2004-03-16 Thread Richard Davey
Hello Joey, Tuesday, March 16, 2004, 6:16:34 PM, you wrote: JK I have a SuSE 9.0 Linux server running PHP and Apache2 (my phpinfo() data is JK at http://redfishnetworks.com/~jkelly/test.php), and my problem is this: JK I've got a sticky problem that I need to solve. I've just turned on JK

RE: [PHP] array $_POST problem

2004-03-16 Thread Chris W. Parker
Joey Kelly mailto:[EMAIL PROTECTED] on Tuesday, March 16, 2004 10:17 AM said: The problem I'm having is that the script Im trying to refactor worked great before I turned register_globals off. The script posts an array, and I can't seem to figure out how to $_POST the array. the script

Re: [PHP] array $_POST problem

2004-03-16 Thread Chris Boget
You're the Joey Kelly who runs the LUG in NoLA, yes? I've got a sticky problem that I need to solve. I've just turned on register_globals in my PHP php.ini file, and therefore have to run my form variables through $_POST: $variable = $_POST[$variable]; echo $variable; Or you can use

RE: [PHP] Array to String conversion error

2004-03-16 Thread Alex Hogan
$row is an entire array. you don't explode an entire array, you only explode the contents of an element of an array. print_r($row) will give you some clues. you'll need to access a specific element within the array. like: $thearray = explode('__', $row[0][0]); That was it... Thanks

[PHP] Array Question

2004-02-28 Thread Jason Williard
I would like to be able to search an array for a match the a specific variable. So far, I have been trying to use preg_grep but am not getting the results that I want. Basically, I would have a variable: $url = domain.com I would like to search an array to see if the value of the variable $url

Re: [PHP] Array Question

2004-02-28 Thread Michal Migurski
I would like to search an array to see if the value of the variable $url exists in this array. The array would look like: in_array() - michal migurski- contact info and pgp key: sf/ca

Re: [PHP] array data

2004-02-11 Thread Richard Davey
Hello Imran, Wednesday, February 11, 2004, 8:17:11 PM, you wrote: IA Is not working, is it correct way IA File1.php IA? $colors = array('red','blue','green','yellow'); ? IAform action=file2.php method=post IA input type=hidden type name=colors value=?=$colors? IA

RE: [PHP] array data

2004-02-11 Thread Shaunak Kashyap
[] value=green input type=hidden name=colors[] value=yellow [/code] ... and File2.php will do its job as desired. Shaunak -Original Message- From: Imran Asghar [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 3:17 PM To: [EMAIL PROTECTED] Subject: [PHP] array data Hi

[PHP] array data

2004-02-10 Thread Imran Asghar
Hi, Is not working, is it correct way File1.php ? $colors = array('red','blue','green','yellow'); ? form action=file2.php method=post input type=hidden type name=colors value=?=$colors? /fomr File2.php ? echo $colors[0]; echo $colors[1]; echo $colors[2];

[PHP] array block

2004-01-30 Thread Brian V Bonini
I'm having array block, trying to format the data in a two dimensional associative array. $menu = array ( 'link1' = array( 'url' = 'foo', 'title' = 'bar' ), 'link2' = array( 'url' = 'foo', 'title' =

[PHP] Array Key Test

2004-01-12 Thread Cameron B. Prince
Hi, How would I go about determining if a specific key exists in an array? I want to see if $conf['hOpt'] is defined. is_array only works at the $conf level. I tried count(array_keys($conf, 'hOpt')), but always get 0. What am I doing wrong here? Thanks, Cameron -- PHP General Mailing List

Re: [PHP] Array Key Test

2004-01-12 Thread Stuart
Cameron B. Prince wrote: How would I go about determining if a specific key exists in an array? http://php.net/isset I want to see if $conf['hOpt'] is defined. is_array only works at the $conf level. I tried count(array_keys($conf, 'hOpt')), but always get 0. if (isset($conf['h0pt'])) -- Stuart

[PHP] Array into $_SESSION

2004-01-02 Thread Cesar Aracena
Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array into $_SESSION

2004-01-02 Thread Gerard Samuel
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. $_SESSION['foo'] = array('a', 'b', 'c', 'd',

Re: [PHP] Array into $_SESSION

2004-01-02 Thread Cesar Aracena
Thanks a lot :) Gerard Samuel [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't

RE: [PHP] Array into $_SESSION

2004-01-02 Thread Larry Brown
To: [EMAIL PROTECTED] Subject: [PHP] Array into $_SESSION Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- PHP General

RE: [PHP] Array into $_SESSION

2004-01-02 Thread Larry Brown
To: Cesar Aracena; PHP List Subject: RE: [PHP] Array into $_SESSION session_register(user); session_register(authLevel); session_register(sessionExpire); $user=$userDataFromForm; $authLevel = $authLevelFromDB; $sessionExpire = time() + 3600; etc... -Original Message- From: Cesar Aracena [mailto

[PHP] array data to XML

2003-12-24 Thread Chakravarthy Cuddapah
newbie ... Is it possible to format data in array to XML and display ? Thanks !

Re: [PHP] Array problem....

2003-12-11 Thread Jas
Well just so you understand why I needed something like that here is the finished result below ?php function show() { require 'path/to/dbconnector.inc'; $sql_subs = mysql_query(SELECT * FROM $t_02,$db)or die(mysql_error()); $i = 0; while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge)

RE: [PHP] Array problem....

2003-12-11 Thread Chris W. Parker
Jas mailto:[EMAIL PROTECTED] on Thursday, December 11, 2003 7:21 AM said: Well just so you understand why I needed something like that here is the finished result below [snip] $i = 0; while(list(...) = mysql_fetch_row(...)) { $_SESSION[$i] = ...; $i++; } I want to change my

Re: [PHP] Array problem....

2003-12-11 Thread Jas
Yeah I understand that and it would be perfect if I only had to call this type of function once on a page... and on any other pages that need something like this I will do it that way but with the counter set to 0 or whatever number I choose which is a sort of view all page so your solutions

[PHP] ARRAY

2003-12-10 Thread Brian Sutton
I am trying to read in a text file to an array using the following code, however everytime I try and print the contents of the $table array, it always says ARRAY. Why won't it show me the actual contents of the file? $row = 1; $handle = fopen (seclog.txt,r); while ($data = fgetcsv ($handle,

Re: [PHP] ARRAY

2003-12-10 Thread ROBERT MCPEAK
Because it's and array! print and echo take strings, not arrays, I believe. Anyway, print_r() or a foreach loop will do it for you. ?php print_r($table); //or foreach ($table as $atable){ echo $tableBr; } ? Something like that. Brian Sutton [EMAIL PROTECTED] 12/10/03 01:26PM I am trying

Re[2]: [PHP] ARRAY

2003-12-10 Thread Richard Davey
Hi, Wednesday, December 10, 2003, 6:29:43 PM, you wrote: RM Because it's and array! print and echo take strings, not RM arrays, I believe. Anyway, print_r() or a foreach loop will do it RM for you. Agreed.. print_r() is the best, but if you're outputting all of this text into the browser

Re: [PHP] ARRAY

2003-12-10 Thread Justin Patrin
Richard Davey wrote: Hi, Wednesday, December 10, 2003, 6:29:43 PM, you wrote: RM Because it's and array! print and echo take strings, not RM arrays, I believe. Anyway, print_r() or a foreach loop will do it RM for you. Agreed.. print_r() is the best, but if you're outputting all of this text

[PHP] Array problem....

2003-12-10 Thread Jas
Not very good at arrays so I figured i would look here ?php $sql_subs = mysql_query(SELECT * FROM $t_02,$db)or die(mysql_error()); while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) = mysql_fetch_row($sql_subs)) { print $sub; print br; print $msk; print br; print $dns01; print br;

RE: [PHP] Array problem....

2003-12-10 Thread Chris W. Parker
Jas mailto:[EMAIL PROTECTED] on Wednesday, December 10, 2003 3:21 PM said: while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) = mysql_fetch_row($sql_subs)) { $_session['something to automaticly increment session var'] = $sub+$msk+$dns01... } No exactly sure what you mean but here

RE: [PHP] Array problem....

2003-12-10 Thread Chris W. Parker
Chris W. Parker on Wednesday, December 10, 2003 3:27 PM said: while(list(...)) = mysql_fetch_row(...)) { Got one too many ) in there. Should be: while(list(...) = mysql_fetch_row(...)) { Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array problem....

2003-12-10 Thread Jas
having no idea you could use numbers as session variable names I kinda feel like a retard right now. You solution worked, thank you very much. Jas Chris W. Parker wrote: Jas mailto:[EMAIL PROTECTED] on Wednesday, December 10, 2003 3:21 PM said:

RE: [PHP] Array problem....

2003-12-10 Thread Chris W. Parker
Jas mailto:[EMAIL PROTECTED] on Wednesday, December 10, 2003 3:44 PM said: having no idea you could use numbers as session variable names I kinda feel like a retard right now. You solution worked, thank you very much. It's an array just like any other which you probably realize now. ;)

Re: [PHP] Array problem....

2003-12-10 Thread John W. Holmes
Jas wrote: but what I need to do is something like this... ?php $sql_subs = mysql_query(SELECT * FROM $t_02,$db)or die(mysql_error()); while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) = mysql_fetch_row($sql_subs)) { $_session['something to automaticly increment session var'] =

Re: [PHP] array problems

2003-11-28 Thread SLanger
$city = Ipswitch; $city_found = 0; $contentfile = fopen(content.txt, r); while (!feof($contentfile) $city_found == 0); { $my_line = fgets($contentfile, 16384); $content_array = explode(\t,$my_line); if ($content_array[0] == $city) { $city_found = 1;

Re: [PHP] array problems

2003-11-28 Thread Jason Wong
On Friday 28 November 2003 16:03, [EMAIL PROTECTED] wrote: I think what you got is a scope problem. You are creating $content_array in your while loop so its scope is limited to the while loop. To test this simply do a var_dump or print_r on $content_array outside your loop and see if it

Re: [PHP] array problems

2003-11-28 Thread Marek Kilimajer
Curtis Maurand wrote: OK. That worked, thanks. Is it me, or is that rather odd behavior? It is you ;) Shouldn't array elements set within a loop be available to me outside the loop if the loop exits normally? A loop is not a function (well it is, sort of.) Should I declare the variable

Re: [PHP] array problems

2003-11-28 Thread Eugene Lee
On Thu, Nov 27, 2003 at 08:19:02PM -0500, Curtis Maurand wrote: : On Wednesday 26 November 2003 21:53, Marek Kilimajer mumble: : Curtis Maurand wrote: : Sorry, its a typo. it should be: : : $city = Ipswitch; : $city_found = 0; : $contentfile = fopen(content.txt, r); : while

Re: [PHP] array problems

2003-11-27 Thread Curtis Maurand
Thank you, I'll try that. Curtis On Wednesday 26 November 2003 21:53, the council of elders heard Marek Kilimajer mumble incoherently: Curtis Maurand wrote: Sorry, its a typo. it should be: $city = Ipswitch; $city_found = 0; $contentfile = fopen(content.txt, r); while

Re: [PHP] array problems

2003-11-27 Thread Curtis Maurand
OK. That worked, thanks. Is it me, or is that rather odd behavior? Shouldn't array elements set within a loop be available to me outside the loop if the loop exits normally? A loop is not a function (well it is, sort of.) Should I declare the variable as global? global $content_array;

Re: [PHP] array problems

2003-11-26 Thread Jason Wong
On Wednesday 26 November 2003 04:45, Curtis Maurand wrote: consider the following code (content.txt is tab delimited). $city = Ipswitch; $content = fopen(content.txt, r); $city_found = 0; while (!feof($content) $city_found == 0) { $my_line = fgets($content, r);

Re: [PHP] array problems

2003-11-26 Thread Curtis Maurand
Sorry, its a typo. it should be: $city = Ipswitch; $city_found = 0; $contentfile = fopen(content.txt, r); while (!feof($contentfile) $city_found == 0); { $my_line = fgets($contentfile, 16384); $content_array = explode(\t,$my_line); if ($content_array[0] == $city) {

Re: [PHP] array problems

2003-11-26 Thread Marek Kilimajer
Curtis Maurand wrote: Sorry, its a typo. it should be: $city = Ipswitch; $city_found = 0; $contentfile = fopen(content.txt, r); while (!feof($contentfile) $city_found == 0); { $my_line = fgets($contentfile, 16384); $content_array = explode(\t,$my_line); if ($content_array[0] ==

[PHP] Array dimension

2003-11-26 Thread orlandopozo
I understand that in PHP there is only one dimension array, and in order to create several dimensions, yo need to nested the same function array(), but in conclusion you obtain n dimensions of the array whatever the implementation, I have already figured it out the problem , thanks anyway for all

[PHP] array problems

2003-11-25 Thread Curtis Maurand
Hello, consider the following code (content.txt is tab delimited). $city = Ipswitch; $content = fopen(content.txt, r); $city_found = 0; while (!feof($content) $city_found == 0) { $my_line = fgets($content, r); $content_array = explode(\t,$my_line); if ($content_array == $city)

Re: [PHP] array problems

2003-11-25 Thread Eugene Lee
On Tue, Nov 25, 2003 at 03:45:11PM -0500, Curtis Maurand wrote: : : Hello, : consider the following code (content.txt is tab delimited). : : $city = Ipswitch; : $content = fopen(content.txt, r); : $city_found = 0; : while (!feof($content) $city_found == 0) : { : $my_line =

Re: [PHP] array problems

2003-11-25 Thread Marek Kilimajer
Curtis Maurand wrote: Hello, consider the following code (content.txt is tab delimited). $city = Ipswitch; $content = fopen(content.txt, r); $city_found = 0; while (!feof($content) $city_found == 0) { $my_line = fgets($content, r); $content_array = explode(\t,$my_line); if

[PHP] array confusion...

2003-11-24 Thread Dan Joseph
Hi, I must be missing something in this array. To me this makes no sense. Here is it broken down... Declartion: $gtotals = array( CO1 = 0, CO2 = 0, CO3 = 0, CO4 = 0, CO5 = 0,

Re: [PHP] array confusion...

2003-11-24 Thread Brad Pauly
On Mon, 2003-11-24 at 13:42, Dan Joseph wrote: Hi, I must be missing something in this array. To me this makes no sense. Here is it broken down... Declartion: $gtotals = array( CO1 = 0, CO2 = 0, CO3 = 0, CO4

RE: [PHP] array confusion...

2003-11-24 Thread Dan Joseph
Hi, I think you might have some letter 'O's instead of the number 0. Notice that you have CO1 and C01 when you print_r. They are different keys. I think you are correct! hahaha... oh man, one of those Mondays! Thank you sir! -Dan Joseph -- PHP General Mailing List

[PHP] Array + postgresql + braincramp

2003-11-18 Thread Roy Cabaniss
The problem is most likely that I have been looking at it for too long and missed the obvious. I know I can make multiple fields in the database and work with it that way, but I'm sure an array is the proper solution. We have a form (and how many of our tales start off like that? Bet it beats

RE: [PHP] Array + postgresql + braincramp

2003-11-18 Thread Giz
: Tuesday, November 18, 2003 12:55 PM To: List PHP General Subject: [PHP] Array + postgresql + braincramp The problem is most likely that I have been looking at it for too long -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array -- If

2003-11-07 Thread Erik Osterman
Williard [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 6:42 PM To: [EMAIL PROTECTED] Subject: [PHP] Array -- If I am building a script that I would like to have do a specific task based on whether specific counts have been reached. Basically, the script checks for connectivity

[PHP] Array -- If

2003-11-05 Thread Jason Williard
I am building a script that I would like to have do a specific task based on whether specific counts have been reached. Basically, the script checks for connectivity in a specific port. If the connectivity fails, it increases the count by 1. It does this every minute. I would like the script

Re: [PHP] Array maybe? Or many SQL insert queries

2003-11-01 Thread Burhan Khalid
Jake McHenry wrote: Hi everyone, here's what I'm doing. As of right now, I don't have anything implemented, but here's what I need to do. I have a web page, with a drop down list of hotels, an input box for the users frequent hotel number, and a add button. At the bottom of the page is a update

RE: [PHP] Array maybe? Or many SQL insert queries

2003-11-01 Thread Jake McHenry
-Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Saturday, November 01, 2003 3:50 AM To: Jake McHenry; [EMAIL PROTECTED] Subject: Re: [PHP] Array maybe? Or many SQL insert queries Jake McHenry wrote: Hi everyone, here's what I'm doing. As of right

Re: [PHP] Array maybe? Or many SQL insert queries

2003-11-01 Thread Burhan Khalid
Jake McHenry wrote: -Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Saturday, November 01, 2003 3:50 AM To: Jake McHenry; [EMAIL PROTECTED] Subject: Re: [PHP] Array maybe? Or many SQL insert queries Jake McHenry wrote: Hi everyone, here's what I'm doing

RE: [PHP] Array maybe? Or many SQL insert queries

2003-11-01 Thread Jake McHenry
-Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Saturday, November 01, 2003 11:16 AM To: Jake McHenry; [EMAIL PROTECTED] Subject: Re: [PHP] Array maybe? Or many SQL insert queries Jake McHenry wrote: -Original Message- From: Burhan Khalid [mailto

[PHP] Array maybe? Or many SQL insert queries

2003-10-31 Thread Jake McHenry
Hi everyone, here's what I'm doing. As of right now, I don't have anything implemented, but here's what I need to do. I have a web page, with a drop down list of hotels, an input box for the users frequent hotel number, and a add button. At the bottom of the page is a update and continue button

[PHP] Array Hell

2003-10-23 Thread Richard Cook
Hi All, Im having a headache trying to sort this out... I have my array which is created each time a user adds an item to my basket, this all works fine. The problem im having is that when the user adds the item to the cart they have the option of selecting '0' as the quantity which in effect

[PHP] array of java-objects

2003-10-23 Thread Helke Schröder
Hi, I'm trying to use our java-code in php. But strange things happens Maybe I did a simple mistake.. $MyInf=new Java(myUtil.myInfo); This is inside of a loop through 3 items: $MyAttributes=array(); $MyAttributes=$MyInf-MyAttrReader($v, ,, $item); $c=null; $c=count($MyAttributes); so far

Re: [PHP] Array Hell

2003-10-23 Thread Curt Zirzow
* Thus wrote Richard Cook ([EMAIL PROTECTED]): Hi All, Im having a headache trying to sort this out... If the customer inputs the value 0 into quantity the array looks like this: $array[0][0] = 22 $array[0][1] = 0 The question is who can i filter the array removing any values

Re: [PHP] array of java-objects

2003-10-23 Thread Raditha Dissanayake
Hi, please post your full code Helke Schröder wrote: Hi, I'm trying to use our java-code in php. But strange things happens Maybe I did a simple mistake.. $MyInf=new Java(myUtil.myInfo); This is inside of a loop through 3 items: $MyAttributes=array(); $MyAttributes=$MyInf-MyAttrReader($v,

Re: [PHP] array of java-objects

2003-10-23 Thread Helke Schröder
Hi, thanks for the replay the var_dump on the array of java-objects looks interesting: the first, which is ok: array(8) { [0]= object(java)(1) { [0]= int(3) } [1]= object(java)(1) [0]= int(4) } [2]= object(java)(1) { [0]= int(5) } [3]= object(java)(1) { [0]= int(6) } [4]= object(java)(1) {

[PHP] Array in SQL-table

2003-10-23 Thread Reidar
I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The PHP-stuff is working OK but the DB-thing isn't. Anyone tried this? Hopefully it is Reidar Solberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array in SQL-table

2003-10-23 Thread Jordan S. Jones
If the field isn't required to be searchable, you could just serialize the array and shove that into a VARCHAR column.. Then unserialize the return value for that column. Jordan S. Jones Reidar wrote: I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The

[PHP] Array to string?

2003-10-14 Thread Douglas Douglas
Hello everybody. Is there any built-in function to convert an array to string? Thanks. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array to string?

2003-10-14 Thread Douglas Douglas
I just found it: implode. Sorry to bother you. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array of Classes

2003-10-06 Thread Rob Wiltbank
Greetings.. Doing some persistant connection socket-based PHP stuff and I'm trying to figure out a few things: 1) How can I create an array of classes so they could be referenced, for instance: $array[$uniqueID][$class-var] = 10; ? 2) Would it instantiate when that particular element was used

Re: [PHP] Array of Classes

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 13:41:22 -0400, you wrote: 1) How can I create an array of classes so they could be referenced, for instance: $array[$uniqueID][$class-var] = 10; ? 2) Would it instantiate when that particular element was used and would the constructor run at that point? 3) Any way to

Re: [PHP] Array of Classes

2003-10-06 Thread Rob Wiltbank
Cheers! Just what I was looking for. :) Rob David Otton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 6 Oct 2003 13:41:22 -0400, you wrote: 1) How can I create an array of classes so they could be referenced, for instance: $array[$uniqueID][$class-var] = 10; ? 2) Would

[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:

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 in

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 Cristian Lavaque
http://www.php.net/manual/en/language.types.array.php If you mean having an array inside an array, of course ? $arr = array(array('data')); ?. There you have an array inside another one, 'data' will be here $var['0']['0']. If you meant using an array item as the key in another array, then you do

[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 workaround

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 Javascript to do the error

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

2003-09-17 Thread Scott Fletcher
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's the clipping of an article about putting HTML variables into a PHP Array upon submission

[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 string length?

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 Mailing

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 array and not

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:

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? :)

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