Re: [PHP-WIN] Array Question

2007-08-17 Thread tg-php
I assume you're getting fields with the same name from pulling data from two or more tables. Something like "SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.id = TABLE2.id" or something like that. At any rate, if you can.. it's always good to name the fields you want to pull instead of using "SELECT

RE: [PHP-WIN] Array Question

2007-08-17 Thread Vandegrift, Ken
7;] mydata['contactID_2'] Ken Vandegrift Shari's Management Corporation Web Developer/Administrator [EMAIL PROTECTED] -Original Message- From: Daniel Kaliel [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 9:40 AM To: php-windows@lists.php.net Subject: [PHP-WIN] Arr

[PHP-WIN] Array Question

2007-08-17 Thread Daniel Kaliel
I have pull a bunch of data from an SQL database through a query. The problem I am running into is I pull two fields with the exact same name. How do I grab the right info? I have been using mydata ß the array name. mydata['contactID'] Should I instead use the array value so mydata[8]?

Re: [PHP-WIN] array walk?

2007-06-28 Thread Michael Southworth
Looks like the answer is in the manual entry for array_walk_recursive http://php.net/array_walk_recursive *Note: * If *funcname* needs to be working with the actual values of the array, specify the first parameter of *funcname* as a reference

[PHP-WIN] array walk?

2007-06-28 Thread Juan Ignacio Borda
this code doesn't work on my PHP Version 5.2.1 (i'm trying to protect a stie from XSS) como'; $a[]=Array('hola','hello'); array_walk_recursive($a,'strip_tags'); echo ""; var_dump($a); echo ""; ?> it outputs: array(2) { [0]=> string(11) "como" [1]=> &array(2) { [0]=> string(11) "hola" [1]=

Re: [PHP-WIN] Array Sorting Help

2004-02-16 Thread Svensson, B.A.T. (HKG)
On Mon, 2004-02-16 at 17:49, Herhuth, Ron wrote: > What I would like to do is to sort the results based on the > "percentageMatch" Obviously my simple flat array will not do the trick. Why don't you just sort them in the database before returning the result set? SELECT ... FROM ... WHERE ... OR

[PHP-WIN] Array Sorting Help

2004-02-16 Thread Herhuth, Ron
Before I begin I must admit I am a bit new to arrays so please be gentle. Here is my situation: I am building an app that queries the database and brings back a result set. This resultset contains last name, first name and id. I am then using the "similar_text" function to weed out only those

[PHP-WIN] Array matching to build table

2003-09-29 Thread Mike Quinn
Hi, I have 3 dynamic arrays which is related data pulled from a mySQL database, the first being day $days[],second being amount $amount[] and third being a specific code $code[]. What I need to do is display a table with 1 to 15 in the left hand column (days) but where the array $days[] contains a

[PHP-WIN] array math...

2003-09-22 Thread Bobo Wieland
Hi! if I have an multi dimensional array, like this: $myArr[0]["points"] = 5; $myArr[1]["points"] = 19; $myArr[2]["points"] = 12; $myArr[3]["points"] = 46; ...and I need to get the highest value stored in the $myArr[]["points"]-element, in this case 46, how do I do it? Thanks for your help!

RE: [PHP-WIN] Array problem (NEVERMIND)

2003-09-11 Thread John Ellingsworth
I forgot the break; for the switch :( Thanks, John Ellingsworth http://mail.med.upenn.edu/~jellings/ -Original Message- From: John Ellingsworth [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 2:37 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Array problem Hi. In the

[PHP-WIN] Array problem

2003-09-11 Thread John Ellingsworth
Hi. In the code below, I always get an error from the sql statement due to some problem in the array result. The goal is to add as many keywords to as many thumbnails selected from a form. The thumbnails have this checkbox: And the keyword this: Animals etc ... The error info is this, with

RE: [PHP-WIN] Array question

2003-08-26 Thread Warren Vail
7;; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Array question Well its not exactly what I was looking for but you gave me some ideas, but still got this small problem: If I know the value in the array, say for example 49. Then I want to store the previous and next value in the array? I know the othe

RE: [PHP-WIN] Array question

2003-08-25 Thread Joachim
ROTECTED] Amne: [PHP-WIN] Array question If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] => 100 If I want to select [50] => 51 and store the value that's 2 positions before and 1 position after, how can I do? If I want to know what position value 71 have?

RE: [PHP-WIN] Array question

2003-08-25 Thread Disko_kex
) then like you sad $dataarray($key+1), that's easy. But the other way -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED] Sent: den 25 augusti 2003 09:33 To: Disko_kex; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Array question in my experience, using numeric indices to

RE: [PHP-WIN] Array question

2003-08-25 Thread Warren Vail
Warren Vail [EMAIL PROTECTED] -Original Message- From: Disko_kex [mailto:[EMAIL PROTECTED] Sent: Sunday, August 24, 2003 11:59 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Array question If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] => 100 If I want

[PHP-WIN] Array question

2003-08-25 Thread Disko_kex
If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] => 100 If I want to select [50] => 51 and store the value that's 2 positions before and 1 position after, how can I do? If I want to know what position value 71 have? I have search the PHP-manual and found some functions as

Re: [PHP-WIN] ARRAY Question!

2003-03-04 Thread Aidal
gt; -Original Message- > --> From: Ben O'Neill [mailto:[EMAIL PROTECTED] > --> Sent: Tuesday, March 04, 2003 5:06 PM > --> To: [EMAIL PROTECTED] > --> Subject: Re: [PHP-WIN] ARRAY Question! > --> > --> > --> Using that it would be: > --> >

RE: [PHP-WIN] ARRAY Question!

2003-03-04 Thread Matt Babineau
It's a numerical key so $myArray[] = "value"; will work perfectly! Thanks! --> -Original Message- --> From: Ben O'Neill [mailto:[EMAIL PROTECTED] --> Sent: Tuesday, March 04, 2003 5:06 PM --> To: [EMAIL PROTECTED] --> Subject: Re: [PHP-WIN] ARRAY Qu

Re: [PHP-WIN] ARRAY Question!

2003-03-04 Thread Ben O'Neill
om: Matt Babineau [mailto:[EMAIL PROTECTED] > Sent: 04 March 2003 21:55 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] ARRAY Question! > > > Ok here goes! > > Lets say I have an array: > > $myArray = array(); > > Now lets say I am looping over something > > >

RE: [PHP-WIN] ARRAY Question!

2003-03-04 Thread Chris Kranz
Sent: 04 March 2003 21:55 To: [EMAIL PROTECTED] Subject: [PHP-WIN] ARRAY Question! Ok here goes! Lets say I have an array: $myArray = array(); Now lets say I am looping over something How do I simply add a new value to the array?? I just want to start tacking on new key/value pai

[PHP-WIN] ARRAY Question!

2003-03-04 Thread Matt Babineau
Ok here goes! Lets say I have an array: $myArray = array(); Now lets say I am looping over something How do I simply add a new value to the array?? I just want to start tacking on new key/value pairs to the array. I must be missing something really basic, but I'm not getting it LOL

Re: [PHP-WIN] array problem need help quick

2002-12-01 Thread Ignatius Reilly
__ - Original Message - From: "DaMouse" <[EMAIL PROTECTED]> To: "PHP - Win" <[EMAIL PROTECTED]> Sent: Sunday, December 01, 2002 6:17 AM Subject: [PHP-WIN] array problem need help quick I need help with a array problem I want one array to be

[PHP-WIN] array problem need help quick

2002-11-30 Thread DaMouse
I need help with a array problem I want one array to be sorted and another taking its same number order e.g. $ar1[0] == "marmite"; $ar2[0] == 10; $ar1[1] == "jam"; $ar2[1] == 11; $ar1[2] == "beef"; $ar2[2] == 7; $ar1[3] == "cabbage"; $ar2[3] == 0; $ar1[4] == "ick"; $ar2[4] == 5;   sort($ar

Re: [PHP-WIN] =array within html table=

2002-10-09 Thread toby z
tony if you want it to be printed inside the table it has to be INSIDE the table inside a ROW and a COLUMN just like you have done with all other tr and td echo("" . $current . ""); godd luck toby --- Anthony Ritter <[EMAIL PROTECTED]> wrote: > I'd like to have the record data - $

[PHP-WIN] =array within html table=

2002-10-08 Thread Anthony Ritter
I'd like to have the record data - $current - *within* the html table but if I run this script it is on a line outside of the table: http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427 510"); array_pop($content); $current = array_pop($content

Re: [PHP-WIN] Array issue

2002-09-24 Thread Ignatius Reilly
- Original Message - From: Kit Kerbel To: [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 4:26 AM Subject: [PHP-WIN] Array issue I have this in my code: "> I'm passing this to a javascript function like this to check all checkboxes: onCl

[PHP-WIN] Array issue

2002-09-24 Thread Kit Kerbel
I have this in my code: "> I'm passing this to a javascript function like this to check all checkboxes: onClick="this.src = check(document.forms[0].elements['horse[]'], document.forms[0].elements['trailer[]'], document.forms[0].elements['tack[]'])" My problem is this...if there are two horse

[PHP-WIN] array from fgetcsv

2002-08-25 Thread crizz
I decided to use fgetcsv, because it puts the data it retrieves from the in an array. But a problem occured (again). I used a while to show the Arrays values but I couldn't find a way stop the while. I tried checking for an empty array " " or "" but never stopped ... is there a nill value in PHP o

RE: [PHP-WIN] array way....

2002-08-25 Thread Ross Fleming
}) check before assigning them however, in case you only get $myvar1, $myvar3, $myvar4 etc. Always program defensively, it saves hassle in the long run. Hope that helps Ross > -Original Message- > From: crizz [mailto:[EMAIL PROTECTED]] > Sent: 25 August 2002 17:21 > To: [E

RE: [PHP-WIN] array way....

2002-08-25 Thread Rich Gray
Crizz use myvar[] in the form and PHP will generate an array for you HTH Rich -Original Message- From: crizz [mailto:[EMAIL PROTECTED]] Sent: 25 August 2002 09:21 To: [EMAIL PROTECTED] Subject: [PHP-WIN] array way Can you helpme with that? I have some variables with names like

[PHP-WIN] array way....

2002-08-25 Thread crizz
Can you helpme with that? I have some variables with names like: $myvar1, $myvar2, $myvar3... and so on... and I want to put them in an array. Ofcourse I need a Loop because I don't know the number of the variables. It will probably be like that: $myarray= range(1,NumberOfVars); $i=1 while ($ i

[PHP-WIN] Array of parameters

2002-07-22 Thread Sandeep Murphy
Hi, Am relatively new to PHP and wud appreciate if anyone can help me out... My URL using the GET method reads as following.. http://feedback.php?date=10-11-2001&policy_codes=1&cbox=on&desc=&policy_codes=9&cbox=on&desc=b&temp=tp Now, I have to insert the data into an MySQL table but am

[PHP-WIN] Array of COM objects doesn't work in PHP but does in ASP?

2002-05-30 Thread Noah
Hey guys, OK I favor PHP so far above ASP however it doesnt seem like PHP can handle an array of COM Objects. Here's the scenario: Within the 'Deal' object contains an array of 'Bonds'. I want to access each bond by doing: $comDeal->Bonds->Item[$i]; ( btw Item is part of

[PHP-WIN] Array of COM objects doesn't work in PHP but does in ASP?

2002-05-22 Thread Noah
Hey guys, OK I favor PHP so far above ASP however it doesnt seem like PHP can handle an array of COM Objects. Here's the scenario: Within the 'Deal' object contains an array of 'Bonds'. I want to access each bond by doing: $comDeal->Bonds->Item[$i]; ( btw Item is part of

[PHP-WIN] Array within a Class?

2002-01-07 Thread FPU . WHITES1
e: Sat, 5 Jan 2002 15:04:07 -0800 Subject: [PHP-WIN] Array within a Class? Just a quicky -- I have yet to see anyone define an array within a class, yet if it is possible, would i be able to access that array with $this->array["variable"];? Thanks in advance. --

Re: [PHP-WIN] Array within a Class?

2002-01-05 Thread Chris Hall
dankeshane Micheal -- ill give it a shot and let ya know how it turns out :) Chris Hall hardwired industries "Michael Sims" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > At 03:04 PM 1/5/2002 -0800, Chris Hall wrote: > >Just a quicky -- > > > >I have yet to s

Re: [PHP-WIN] Array within a Class?

2002-01-05 Thread Ed Swartz
Mike, Yes, you can create and access an array within a class. I've written seveal classes using arrays and it works just fine: class Produce { var $Fruit = array(); function Produce() { // Access class variable $this->Fruit[] = "Oranges

Re: [PHP-WIN] Array within a Class?

2002-01-05 Thread Michael Sims
At 03:04 PM 1/5/2002 -0800, Chris Hall wrote: >Just a quicky -- > >I have yet to see anyone define an array within a class, yet if it is >possible, would i be able to access that array with >$this->array["variable"];? I've designed a class that has a method that RETURNS an array, but it sounds l

[PHP-WIN] Array within a Class?

2002-01-05 Thread Chris Hall
Just a quicky -- I have yet to see anyone define an array within a class, yet if it is possible, would i be able to access that array with $this->array["variable"];? Thanks in advance. -- Chris Hall Web Application Developer -- hard

[PHP-WIN] array problems

2001-11-30 Thread ChaoticWorks
i have been learning php from a book, but whenever i do array examples i get errors. like if i have multi selectional list box and there are 5 things to select and you select 3, there will be 2 errors and then the results of the 3 will display. i dont think i have the full php installation or s

[PHP-WIN] Array Manipulation?

2001-10-16 Thread Mark Sweeney
Hey, Just wondering, I am fetching a load of ids and names from a Mysql database. However, I want to exclude 3 of the results from this based on their id numbers. How would I go about this? An array_filter? And if so, what would I do? sorry for my isiocy, but I am still learning and its pretty

[PHP-WIN] ARRAY

2001-10-13 Thread serkan
Hi all, Say I have a multid. array $characters(see below). My question is how I = can add the array $first to array $characters. At the end I gotta have 4 = arrays in my multid. array $characters. Is this possible ??? $characters =3D array ( array(name=3D> "bob",

Re: [PHP-WIN] array problems

2001-09-07 Thread leo g. divinagracia iii
"Svensson, B.A.T." wrote: > > Have you consider to write a recursive > function to explore all the sublevels? > > i was thinking of the same thing. btw, are there dynamic pointers in PHP? cause a binary tree structure would be better for this. btw, watch out for recursive code that goes on

Re: [PHP-WIN] array problems

2001-09-07 Thread Mike Flynn
Hi Andrew, I have done something very similar to this. Pretty identical. I know it may seem complicated, but I think if you take a good look at it this code might help you. It's for managing a dynamic -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTE

RE: [PHP-WIN] array problems

2001-09-07 Thread Svensson, B.A.T.
Have you consider to write a recursive function to explore all the sublevels? >-Original Message- >From: Andrew.Martin [mailto:[EMAIL PROTECTED]] >Sent: Friday, September 07, 2001 11:43 AM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] array problems > > > &

[PHP-WIN] array problems

2001-09-07 Thread Andrew.Martin
I want to build an array dynamically from a database. I have a structure where there is a top level, under which there can be a sub level and a sub-sub level etc... e.g Top Level 1 id =1 parent id =0 Sub Level 1.1 id =2 paren

[PHP-WIN] R: [PHP-WIN] Array

2001-08-21 Thread Darvin Andrioli
Change your code in: } ?> You will obtain an array, named test, with 5 elements. Bye Darvin > -Messaggio originale- > Da: Sichta Daniel [mailto:[EMAIL PROTECTED]] > Inviato: martedi 21 agosto 2001 15.15 > A: [EMAIL PROTECTED] > Oggetto: [PHP-WIN] Array > &

[PHP-WIN] Array

2001-08-21 Thread Sichta Daniel
Hi there !! cfg: php4.0.4pl1, w2k, apache 1.3.20 Situation: } ?> This is all in one form. How can I get all five values of test from this kind of code ? DAN

[PHP-WIN] array() :: *gone*

2001-08-08 Thread Erik Xstensen
I get this beautiful error message, "Call to undefined function: array() in c:\inetpub\wwwroot\admin.php " running PHP on Windows 2k IIS how can I fix it? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP-WIN] array problem??

2001-07-29 Thread [EMAIL PROTECTED]@php¤¤..
O.thank for yr help..^_^ "Mike Flynn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > At 11:32 AM 7/29/01 -0700, Rasmus Lerdorf wrote: > > > > > $a = array("a","b","c"); > > > > > > for ($c=0 ; $c < count($a) ; ++$c);{ > > > >Get rid of the ; there

Re: [PHP-WIN] array problem??

2001-07-29 Thread Mike Flynn
At 11:32 AM 7/29/01 -0700, Rasmus Lerdorf wrote: > > > $a = array("a","b","c"); > > > > for ($c=0 ; $c < count($a) ; ++$c);{ > >Get rid of the ; there ^^^ Also, echo("$a[$c] \n"); will probably not work. Try: echo $a[$c]."\n"; or, using your syntax, echo($a[$c]."\n"); You may want to

Re: [PHP-WIN] array problem??

2001-07-29 Thread [EMAIL PROTECTED]@php¤¤..
oh. thx for yr help^_^ "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Mon, 30 Jul 2001, delol@2k@php¤¤.. wrote: > > > > $a = array("a","b","c"); > > > > > > for ($c=0 ; $c < count($a) ; ++$c);{ > > Get rid of the ; there

Re: [PHP-WIN] array problem??

2001-07-29 Thread Rasmus Lerdorf
On Mon, 30 Jul 2001, delol@2k@php¤¤.. wrote: > $a = array("a","b","c"); > > > for ($c=0 ; $c < count($a) ; ++$c);{ Get rid of the ; there ^^^ -Rasmus -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

[PHP-WIN] array problem??

2001-07-29 Thread [EMAIL PROTECTED]@php¤¤..
\n"); } ?> I suppose it should be display ~~ a b c ~~ but it doesn't work, pls help. the emtpy page was displayed. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

[PHP-WIN] array in Session-Vars?

2001-03-29 Thread Thomas Häger
Hi all, i need to use an array in a session variable. On a page i fill the Sessionvar : $HTTP_SESSION_VARS["xy"] []=$whatever (The var is registered with session_register("xy")) I mean that the entry would made at the end of the array, is it not so? But evrey time i proove the entries wi

RE: [PHP-WIN] Array How To ???

2001-03-28 Thread Andreas Lange
Hi > -Original Message- > From: Barry [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 27, 2001 10:23 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Array How To ??? > > > Hello Everyone, > > I would like to sort a list of array indices. The array

[PHP-WIN] Array How To ???

2001-03-27 Thread Barry
Hello Everyone, I would like to sort a list of array indices. The array is multi- dimensional N x 3 for example, if (note the actual data is not important to my question): $a[0]['a'] = 1, $a[0]['b'] = 2, $a[0]['c'] = 3 $a[1]['a'] = 1, $a[1]['b'] = 2, $a[1]['c'] = 3 $a[2]['a'] = 1, $a[2]['b'] =

[PHP-WIN] Array from drop down list passing as string

2001-03-02 Thread Charles Williams \( CEO ACNS \)
I have a drop down list that is passing the value "Array" back to the script. Any ideas why? Here is the code. function dump_array($array_name){ switch (gettype($array_name)){ case 'integer': case 'double': case 'string': echo