Re: [PHP] Array wildcard?

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Leif K-Brooks wrote: on 4/25/02 1:58 PM, Miguel Cruz at [EMAIL PROTECTED] wrote: On Thu, 25 Apr 2002, Leif K-Brooks wrote: Is there some array wildcard I can use? In other words, I have an array. Is there any wildcard function/character that will let me test to see if a

Re: [PHP] Array function to delete

2002-04-25 Thread Kevin Stone
[] = $listitems[$i]; } } $listitems = $tmplist; //new array contains (grill, bar, world) ? -Kevin - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 2:27 PM Subject: Re: [PHP] Array function to delete Thanks for all your help

Re: [PHP] Array function to delete

2002-04-25 Thread Lars Torben Wilson
(grill, bar, world) ? -Kevin - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 2:27 PM Subject: Re: [PHP] Array function to delete Thanks for all your help, everyone, but both suggestions (unset and array_slice

[PHP] Once more: [PHP] Array indices - PLEASE HELP!!

2002-04-24 Thread esivertsen
Does nobody have a suggestion to the below? Perhaps there is an easy solution, but I cant see it at the time. Eivind Hi all, I have a question regarding array indices: At a certain point in code, I run array_diff() on two arrays to produce a reduced version of one of the argument

Re: [PHP] Once more: [PHP] Array indices - PLEASE HELP!!

2002-04-24 Thread Jason Wong
On Wednesday 24 April 2002 17:14, esivertsen wrote: Does nobody have a suggestion to the below? Perhaps there is an easy solution, but I cant see it at the time. Eivind Hi all, I have a question regarding array indices: At a certain point in code, I run array_diff() on two

Re: [PHP] Once more: [PHP] Array indices - PLEASE HELP!!

2002-04-24 Thread esivertsen
just run your array through a foreach loop assigning each key-value pair to a new array. OK, I was trying to see if there was a more elegant way to do it, so I wouldn't have to make the loop. Like just re-mapping the indices to default values by a short and simple operation. But it will do

[PHP] Array question

2002-04-23 Thread Bas Jochems
Hello, Suppose i've got the following array: $a = array( color = red, taste = sweet, shape = round, name = apple, 3 = 4 ); Now I would like to remove the color field and value. Whats the best way to do this? Thanks. -- PHP General Mailing List

Re: [PHP] Array question

2002-04-23 Thread Michal Dvoracek
Hello, i think that unset($a['color']); is the best way :) Regards Michal Dvoracek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array indices

2002-04-23 Thread esivertsen
Hi all, I have a question regarding array indices: At a certain point in code, I run array_diff() on two arrays to produce a reduced version of one of the argument arrays. Problem is, I dont want the key-value associations to be preserved. I need that the returned array has new (integer, not

Re: [PHP] Array Question

2002-04-19 Thread Erik Price
On Thursday, April 18, 2002, at 05:38 PM, Jason Lam wrote: But, $arr1[0] = 1; $arr1[1] = 10; $arr2[0] = $arr1; $arr3 = each($arr2); print $arr3[1]; Result is not 10. So, function each is not taking the whole $arr2[0] out.. My question is what function should I use to iterate

[PHP] Array Question

2002-04-18 Thread Jason Lam
$arr2 is a 2d array. $arr1[0] = 1; $arr1[1] = 10; $arr2[0] = $arr1; print $arr2[0][1]; Result will be 10 But, $arr1[0] = 1; $arr1[1] = 10; $arr2[0] = $arr1; $arr3 = each($arr2); print $arr3[1]; Result is not 10. So, function each is not taking the whole $arr2[0] out.. My question is

Re: [PHP] Array Question

2002-04-18 Thread Steve Cayford
On Thursday, April 18, 2002, at 04:38 PM, Jason Lam wrote: $arr2 is a 2d array. $arr1[0] = 1; $arr1[1] = 10; $arr2[0] = $arr1; print $arr2[0][1]; Result will be 10 But, $arr1[0] = 1; $arr1[1] = 10; $arr2[0] = $arr1; $arr3 = each($arr2); print $arr3[1]; What are you expecting?

[PHP] array of checkboxes?

2002-04-16 Thread Jeff D. Hamann
I'm trying to apply/update a database using a form on a previous page that uses checkboxes instead of edit fields, and I'm having trouble getting the correct values from the checkboxes. My form: printf( TD align='center' ); if( $row[approved] == 1 ) { printf( INPUT type='checkbox'

Re: [PHP] Array elements missing

2002-04-09 Thread Joshua E Minnie
Thanks for the suggestion. I did get it to work prior to your posting, but this does help slim up my code quite a bit. -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. Jason Wong [EMAIL PROTECTED] wrote: On Monday 08 April 2002

[PHP] Array elements missing

2002-04-08 Thread Joshua E Minnie
Can anyone tell me why when the first element in my array would disappear with the following code: ? //remove the unwanted item from the array for($i=0;$icount($stores);$i++) { $delete=0; //checking to see if it has been requested for delete foreach($HTTP_POST_VARS as $val) {

Re: [PHP] Array elements missing

2002-04-08 Thread Jason Wong
On Monday 08 April 2002 23:03, Joshua E Minnie wrote: Can anyone tell me why when the first element in my array would disappear with the following code: ? //remove the unwanted item from the array for($i=0;$icount($stores);$i++) { $delete=0; //checking to see if it has been

[PHP] array limits in echo function?

2002-04-08 Thread lmlweb
I'm just curious: if I use within my html codes: ?php echo $fname $lname; ?, I get an error message telling me: Parse error: parse error, expecting `','' or `';'' However, if I take out one of the variables so that it reads ?php echo $lname; ? it works. Has it always been this way? I never

Re: [PHP] array limits in echo function?

2002-04-08 Thread Miguel Cruz
On Mon, 8 Apr 2002, lmlweb wrote: I'm just curious: if I use within my html codes: ?php echo $fname $lname; ?, I get an error message telling me: Parse error: parse error, expecting `','' or `';'' However, if I take out one of the variables so that it reads ?php echo $lname; ? it

Re: [PHP] array limits in echo function?

2002-04-08 Thread lmlweb
Hi Miguel, I'm reading the manual as of this moment. Thank you for saying RTFM so very nicely! I guess I've used $fname $lname before, and just forgot at this point. Cheers, Laurie Miguel Cruz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 8 Apr 2002,

[PHP] Array Question

2002-03-26 Thread John Fishworld
I have some multiple select boxes in a form ie SELECT name=state[] multiple size=5 style=width:360; option value=allall Regions /option option value=16Region19 /option option value=14Region14/option option value=5Region15/option these then get passed and

[PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher
I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Julio Nobrega Trabalhando
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho?

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price
On Tuesday, March 26, 2002, at 01:18 PM, Jeff Hatcher wrote: I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count

Re: [PHP] Array Question

2002-03-26 Thread Jim Lucas [php]
PROTECTED] To: 'John Fishworld' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:07 AM Subject: RE: [PHP] Array Question $n =sizeof($state); $srch = ; while( $x=0; $x$n; $x++) { ... do something with array element $state[$x] ... $srch .= $state[$x]., ; } $srch

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Jim Lucas [php]
and do something like this. foreach($address AS $k = $v) { echo $k : $v; } Jim Lucas www.bend.com - Original Message - From: Jeff Hatcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets

Re: [PHP] Array in a Loop Question

2002-03-26 Thread John Fishworld
, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does

RE: [PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i This works fine and I also can do the address[] but my ultimate result is to put this in the database. So address='$_POST['address' . $i]' fails and address='$_POST[address][$i]'

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price
On Tuesday, March 26, 2002, at 02:12 PM, Jeff Hatcher wrote: So my question is how can I put this in the database without having to reassign my variable name? You have to jump out of the quoted string that represents your SQL query when you echo the value of the $_POST variable. Like

[PHP] array within an array

2002-03-15 Thread Caspar Kennerdale
I have an sql query which calls * rows from a table. Each row is an array of table field values. This is how I understand the heirachy $table_row_array[0] = $field_row_array[] $table_row_array[1] = $field_row_array[] $table_row_array[2] = $field_row_array[] Now $table_row_array is being drawn

Re: [PHP] array within an array

2002-03-15 Thread Jan Rademaker
On Fri, 15 Mar 2002, Caspar Kennerdale wrote: I have an sql query which calls * rows from a table. Each row is an array of table field values. This is how I understand the heirachy $table_row_array[0] = $field_row_array[] $table_row_array[1] = $field_row_array[] $table_row_array[2] =

RE: [PHP] array within an array

2002-03-15 Thread Niklas Lampén
$array[0][1] is how you access multi-dimensional arrays. Niklas -Original Message- From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]] Sent: 15. maaliskuuta 2002 15:18 To: [EMAIL PROTECTED] Subject: [PHP] array within an array I have an sql query which calls * rows from a table

RE: [PHP] array within an array

2002-03-15 Thread Caspar Kennerdale
Thanks all I knew it was something simple, but my brain was in twists. (no change there ha ! ha !) -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 13:24 To: Php-General Subject: RE: [PHP] array within an array $array[0][1] is how you

RE: [PHP] array within an array (one more query)

2002-03-15 Thread Caspar Kennerdale
PROTECTED]] Sent: 15. maaliskuuta 2002 15:18 To: [EMAIL PROTECTED] Subject: [PHP] array within an array I have an sql query which calls * rows from a table. Each row is an array of table field values. This is how I understand the heirachy $table_row_array[0] = $field_row_array[] $table_row_array[1

RE: [PHP] array within an array (one more query)

2002-03-15 Thread Niklas Lampén
Yes. Niklas -Original Message- From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]] Sent: 15. maaliskuuta 2002 15:35 To: Php-General Subject: RE: [PHP] array within an array (one more query) can you therefore have $array[0][9][2][3] if you had an array within an array within an array

Re: [PHP] array within an array (one more reply)

2002-03-15 Thread bvr
Sorry, replies to really deep threads looks nice in my mail program.. ;)bvr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array

2002-03-13 Thread Roman Duriancik
I have one small problem. I have array e.g $array but I don't know how to finding arguments and values of this array. e.g $array[aa] = 1; $array[ab] = some; ... and script send me : arguments aa : values 1 arguments bb : values some thanks, roman -- PHP General Mailing List

Re: [PHP] Array

2002-03-13 Thread Hiroshi Ayukawa
How about using the function print_r() ? Regards, Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array

2002-03-13 Thread Ford, Mike [LSS]
-Original Message- From: Roman Duriancik [mailto:[EMAIL PROTECTED]] Sent: 13 March 2002 08:40 I have one small problem. I have array e.g $array but I don't know how to finding arguments and values of this array. e.g $array[aa] = 1; $array[ab] = some; ... and script send

[PHP] php array

2002-03-12 Thread Rodrigo Peres
Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array, but how can I make an validation code with javascript to know if the user didn't typed

RE: [PHP] php array

2002-03-12 Thread Demitrious S. Kelly
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 10:11 AM To: PHP Subject: [PHP] php array Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand

Re: [PHP] php array

2002-03-12 Thread Jim Lucas [php]
[EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 10:10 AM Subject: [PHP] php array Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array

[PHP] Array or SQL?

2002-02-28 Thread Kristjan Kanarik
Hi, I've never had reason to get deeply into array functions, but now it is very likely needed I'm working on a small search engine (to search text from articles) and I'm not sure wheter I will be able to complete it without any external help Here is a snip of code: /* I'm using MySQL 32337

Re: [PHP] Array or SQL?

2002-02-28 Thread Simon Willison
Here is a way of doing it with arrays - I don't know enough advanced mySQL syntax to see how it could be done just in mySQL: $resultsArray = array(); while ($results = mysql_fetch_array($article_query)) { $art_name = $results[article_name]; $art_text = $results[article_text];

[PHP] Array HELL!!!!

2002-02-22 Thread jas
I don't know what it is but I am having a hell of a time trying to get some results of a query setup into an array or variable (too much of a newbie to know which) that can be passed to a confirmation page before deleting the record from a table. I have given up working on this but for those of

Re: [PHP] Array HELL!!!!

2002-02-22 Thread William Lovaton
El vie, 22-02-2002 a las 04:54, jas escribió: I don't know what it is but I am having a hell of a time trying to get some results of a query setup into an array or variable (too much of a newbie to know which) that can be passed to a confirmation page before deleting the record from a table.

[PHP] array session variable problem (register_global=off)

2002-02-20 Thread Harry Yu
Hi All, I have register_global = off and I have problem retrieving array session variable. For example; Page1.php ?php $name = array(); session_register (name); $name[first] = First Name; $name[last] = Last Name; ? Page2.php ? session_start(); echo $_SESSION[name['first']]; echo

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Johnson, Kirk
: Wednesday, February 20, 2002 2:12 PM To: [EMAIL PROTECTED] Subject: [PHP] array session variable problem (register_global=off) Hi All, I have register_global = off and I have problem retrieving array session variable. For example; Page1.php ?php $name = array

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Harry Yu
, 2002 2:12 PM To: [EMAIL PROTECTED] Subject: [PHP] array session variable problem (register_global=off) Hi All, I have register_global = off and I have problem retrieving array session variable. For example; Page1.php ?php $name = array(); session_register (name); $name[first

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Johnson, Kirk
Doh! I meant this: $_SESSION['name']['first'] = 'First Name'; -Original Message- From: Harry Yu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:52 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] array session variable problem (register_global=off) Thanks for your

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Harry Yu
Thanks Kirk, That works. Harry __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array variable name

2002-02-15 Thread Tomek Golembiewski
Dnia czwartek 14 luty 2002 21:14, Rick Emery napisa: How can I get the name of array variable into str? what are your trying to do with it?? This: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo

[PHP] array variable name

2002-02-14 Thread Tomek Golembiewski
How can I get the name of array variable into str? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] array variable name

2002-02-14 Thread Rick Emery
what are your trying to do with it?? -Original Message- From: Tomek Golembiewski [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 8:20 AM To: [EMAIL PROTECTED] Subject: [PHP] array variable name How can I get the name of array variable into str? -- PHP General Mailing

Re: [PHP] array variable name

2002-02-14 Thread Jim Lucas [php]
I think you are looking for the function called array_key() http://www.php.net/manual/en/function.array-keys.php Jim Lucas - Original Message - From: Tomek Golembiewski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 6:20 AM Subject: [PHP] array variable name

[PHP] Array scanning stops by itself before reaching the end.

2002-02-10 Thread Raúl Sánchez T .
I got this stupid problem: I create an HTML list of inputs: input name=Answer[] type='checkbox' that stretches to some 25 elements. When I try to read the values (on or off) with the code below, PHP won't read past the 8th. element and says it's found an undefined variable (which is $x). No

Re: [PHP] Array scanning stops by itself before reaching the end.

2002-02-10 Thread Bogdan Stancescu
Are you actually checking more than eight checkboxes? Otherwise you don't _get_ the ones which are unchecked at all - that's the way it works. The ideal way to do this - if you have to do it with arrays - is to walk $Answer and check WHAT'S in there, rather than IF there is something in there.

[PHP] array variable passing in session.

2002-02-07 Thread Peter Ruan
Hi, I am running into a problem that I can't figure out the solution to. So I'm hoping that someone can give me some pointers here. I have two files (see below): verify.php and edit.php The job of verify.php is basically to verify that a user is in the database before allowing him/her to

[PHP] Array length

2002-02-06 Thread David Orn Johannsson
Isin’t there a function to determine the length of an array? I can’t seem to find it in the manual http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari Atómstöðin hf. Garðastræti 37 101 Reykjavík sími: 595-3643 fax:

Re: [PHP] Array length

2002-02-06 Thread pioneer
On Wed, 6 Feb 2002, David Orn Johannsson wrote: Isin’t there a function to determine the length of an array? I can’t seem to find it in the manual http://www.php.net/manual/en/function.count.php -- Nick Winfield. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array length

2002-02-06 Thread val petruchek
count($array) Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: David Orn Johannsson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 06, 2002 1:50 PM Subject: [PHP] Array length Isin't there a function

[PHP] Array !!!

2002-02-06 Thread Pavel Zvertsov
Help!! How to move an array's internal pointer to the required element not the first one or last one??? Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array !!!

2002-02-06 Thread hugh danaher
element: echo $array_name['some_word_goes_here']; - Original Message - From: Pavel Zvertsov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 06, 2002 12:23 PM Subject: [PHP] Array !!! Help!! How to move an array's internal pointer to the required element

[PHP] Array() Limit

2002-01-29 Thread Zach Curtis
Is there a limit to the number of key=value pairs that can be stored in an array? Or is this more a function of RAM limits? Thanks. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] Array() Limit

2002-01-29 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Zach Curtis blurted Is there a limit to the number of key=value pairs that can be stored in an array? Or is this more a function of RAM limits? AFAIK it would just be a resources issue. Are you just curious, or.? - -- Nick

RE: [PHP] array[] and Javascript.

2002-01-24 Thread Martin Towell
syntax: document.forms[form_name].elements[element_name] so: document.forms[fname].elements[array[]].somethingelse -Original Message- From: Rodolfo Gonzalez [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 1:55 PM To: [EMAIL PROTECTED] Subject: [PHP] array[] and Javascript

[PHP] RE: PHP array or SQL problem

2002-01-15 Thread Tim Ward
://www.chessish.com -- From: Dean Householder [SMTP:[EMAIL PROTECTED]] Sent: 15 January 2002 07:35 To: [EMAIL PROTECTED] Subject: PHP array or SQL problem I've got a database with lname (lastname), fname (firstname), and nickname. What I

[PHP] Re: PHP array or SQL problem

2002-01-15 Thread Daniel Grace
Dean Householder [EMAIL PROTECTED] wrote in message 007301c19d97$21968660$d5246541@daylightcreations">news:007301c19d97$21968660$d5246541@daylightcreations... I've got a database with lname (lastname), fname (firstname), and nickname. What I want to do is search by either first name or last

Re: [PHP] PHP array or SQL problem

2002-01-15 Thread Dean Householder
Thanks so much!! You guys rock! Dean - Original Message - From: Dean Householder [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:34 AM Subject: [PHP] PHP array or SQL problem I've got a database with lname (lastname), fname (firstname), and nickname. What

[PHP] PHP array or SQL problem

2002-01-14 Thread Dean Householder
I've got a database with lname (lastname), fname (firstname), and nickname. What I want to do is search by either first name or last name. Either way, I display the nickname instead of the firstname if it exists. I have no problems on the last name, but when I sort by firstname, the people

RE: [PHP] Array Creation

2002-01-10 Thread Ford, Mike [LSS]
-Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 20:56 while (!feof ($fp)) { $line = fgets($fp, 4096); $data = explode(,, str_replace(\, , $line)); //using str_replace to get rid of quote marks //following line to

[PHP] Array Creation

2002-01-09 Thread Jamison Roberts
What I have is a text file that has data in the following format: username, numbers The quotation markes can't be helped...the script I use to generate the file adds them automatically. (Hummingbird Basic, one of the worst languages in the history of mankind.) What I've been trying to do is

Re: [PHP] Array Creation

2002-01-09 Thread Bogdan Stancescu
while (!feof ($fp)) { $line = fgets($fp, 4096); $data = explode(,, str_replace(\, , $line)); //using str_replace to get rid of quote marks //following line to see if data is correct echo $data[0]. .$data[1].br; $theArray[$data[0]]=$data[1]; } fclose($fp);

Re: [PHP] Array Creation

2002-01-09 Thread Bogdan Stancescu
Also, make sure you get rid of the space at the beginning of $data[1] - the space after the comma gets in there, so either use trim() or just trim the first character programatically ($data[1]=substr($data[1],1)). Bogdan Jamison Roberts wrote: What I have is a text file that has data in the

[PHP] array in email

2001-12-29 Thread Jordan
I've searched the archive but can't seem to find anything on the mail() function of PHP. I've got the whole function working in a simplistic manner but I can't do one thing. How is it possible to print arrays inside the body of the message. I can't seem to run a loop or anything and all I have

[PHP] array in sessions

2001-12-17 Thread Gregor Jaksa
Hello, is it possible to register array in session .. something like that: session_register(ex_array[field1]); session_register(ex_array[field2]); this example of course doesnt work :), so if anyone knows a solution, plz tell thx -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] array in sessions

2001-12-17 Thread Nick Winfield
On Tue, 18 Dec 2001, Gregor Jaksa wrote: Hello, is it possible to register array in session .. something like that: session_register(ex_array[field1]); session_register(ex_array[field2]); this example of course doesnt work :), so if anyone knows a solution, plz tell Why not just store

[PHP] Array Help

2001-11-27 Thread Brian V Bonini
How can I access the inner most info in this array? Ie, Item and url $var = array( category = array( subcategory = array( Item = url ), ) ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: [PHP] Array Help

2001-11-27 Thread Jack Dempsey
you can just kept adding []'s $var[category][subcategory][Item] = url; -Original Message- From: Brian V Bonini [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 4:56 PM To: PHP Lists Subject: [PHP] Array Help How can I access the inner most info in this array? Ie, Item

[PHP] how to acess php array var in Js?

2001-11-27 Thread Christian Dechery
If I have a series of checkboxes like this: input type=checkbox name=cb[] value=1 This is 1 input type=checkbox name=cb[] value=2 This is 2 input type=checkbox name=cb[] value=3 This is 3 input type=checkbox name=cb[] value=4 This is 4 how can I acess cb[] in Javascript other than using the

RE: [PHP] how to acess php array var in Js?

2001-11-27 Thread Martin Towell
try : form_name[cb[]] -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] how to acess php array var in Js? If I have a series of checkboxes like this: input type=checkbox name=cb

[PHP] Array From DB sQLServer

2001-11-16 Thread Joe Van Meer
Hi there. I have a table called IMAGES and I would like to retrieve all image_ids and dump into an array. I'm new to php so any help would greatly be appreciated. I started my code below, but am unsure what to do next :( Thx Joe:) 'connect to db $connectionToDBid = odbc_connect(codesnipits,

[PHP] Php Array

2001-11-16 Thread Wee Chua
Hi all, How can I send the values inside the array into a function for calculation? Thank you, Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

RE: [PHP] Php Array

2001-11-16 Thread Boget, Chris
How can I send the values inside the array into a function for calculation? function addValues( $arrayVar ) { $reteval = 0; foreach( $arrayVar as $element ) { $retval += $element; } return $retval; } $myArray = array( 1, 2, 3, 4, 4 ); echo addValues( $myArray ); Chris

[PHP] Array problrem!

2001-11-14 Thread De Necker Henri
Hi there. I have an array like this : 1.2 , 0.3 , 0.5 , 1.6 , 0.3 I output like this: while($data_array[$j]){ echo br$data[$j] ; $j++ ; } My output is like this : 1 , 0 , 0 , 1 , 0 The values in the db are floats and are read correctly ! Why is the values not there.Is there a

Re: [PHP] Array problrem!

2001-11-14 Thread Andrey Hristov
PROTECTED] Sent: Wednesday, November 14, 2001 11:35 AM Subject: [PHP] Array problrem! Hi there. I have an array like this : 1.2 , 0.3 , 0.5 , 1.6 , 0.3 I output like this: while($data_array[$j]){ echo br$data[$j] ; $j++ ; } My output is like this : 1 , 0 , 0 , 1 , 0

[PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
(Before you write RTFM, please know that I have checked www.php.net, zend.com, phpbuilder.com, et all, and--in the eternal words of Bono--I still haven't found what I'm looking.) The situation: I extract an array from a MySQL table. Code: $models = mysql_fetch_array(mysql_query(SELECT

RE: [PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
Oops, guess I posted too soon. Just figured out the problem myself (use a do/while...). Thanks anyways. -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 08, 2001 3:25 PM To: Php-General Subject: [PHP] Array HELP PLEASE (Before you write

Re: [PHP] Array HELP PLEASE

2001-11-08 Thread Jim Lucas
models WHERE lang='$lang' AND key1='data' AND key2='$series',$db); while ($models = mysql_fetch_array($results)) { echo $models .p; } Jim - Original Message - From: René Fournier [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Thursday, November 08, 2001 2:25 PM Subject: [PHP

RE: [PHP] Array HELP PLEASE

2001-11-08 Thread René Fournier
Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 08, 2001 3:39 PM To: Php-General Subject: RE: [PHP] Array HELP PLEASE Oops, guess I posted too soon. Just figured out the problem myself (use a do/while...). Thanks anyways. -Original Message- From

RE: [PHP] Array HELP PLEASE

2001-11-08 Thread Martin Towell
PROTECTED]] Sent: Friday, November 09, 2001 10:06 AM To: Php-General Subject: RE: [PHP] Array HELP PLEASE Or maybe not. :-) Although I got both rows displaying, they're actually two long to fit comfortably (w/o horizontally scrolling). So... I'd like to flip the axis of the table, so my header

[PHP] Array of classes

2001-10-30 Thread Andrzej Roszkowski
Hi! I have to create array of classes. When I do it this way: f add($sth) $this-array[] = $sth; it doesn't work :( when i'm trying to get class from there it says that this is not an object. How to do it rigth way?

[PHP] Array explicit keys verification

2001-10-26 Thread m0sh3
Hi, i'm trying to find elegant way to find if Array was declared with explicit keys or only as values. Like, I would like to make a function that knows if array argument was given with keys or only values, function that can distinguish between: func(array(value1,value2,value3)) and

[PHP] array to string

2001-10-19 Thread René Fournier
Just trying to convert an array to string before writing the whole thing back out to a file. (Trying to do a simple database-less database, using text files). $fcontents = file($name..db); // THE ENTIRE TABLE $fcontents[$update] = $updatedstring; // THE ROW TO BE UPDATED

Re: [PHP] array to string

2001-10-19 Thread Steve Werby
René Fournier [EMAIL PROTECTED] wrote: Just trying to convert an array to string before writing the whole thing back out to a file. (Trying to do a simple database-less database, using text files). $fcontents = file($name..db); // THE ENTIRE TABLE $fcontents[$update] = $updatedstring; //

Re: [PHP] array to string

2001-10-19 Thread R'twick Niceorgaw
the $fupdatecontents .=$value; line to $fupdatecontents .=$value.\n; HTH R'twick - Original Message - From: René Fournier [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, October 19, 2001 12:05 PM Subject: [PHP] array to string Just trying to convert an array to string before

[PHP] Array Elements While Loops

2001-10-01 Thread Tom Churm
hi, my problem is this: i'm using a while loop to check elements in an Array for valid email syntax. if $User[0] is a valid email address but $User[1] is not, the code for $User[0] is still executed before the die statement. i need my loop to finish checking ALL array elements for validity,

Re: [PHP] Array Elements While Loops

2001-10-01 Thread Steve Cayford
Where is the closing brace for your while loop? -Steve On Monday, October 1, 2001, at 07:04 AM, Tom Churm wrote: hi, my problem is this: i'm using a while loop to check elements in an Array for valid email syntax. if $User[0] is a valid email address but $User[1] is not, the code for

Re: [PHP] array

2001-09-27 Thread Jason G.
check out the serialize() and unserialize() functions in the manual. replace this: print(A HREF=new_page?arr=$array sort /a); with this a href=new_page.php?arr=? echo(urlencode(serialize($array))); ? sort /a Excerpt from the manual: http://www.php.net/manual/en/function.serialize.php If you

[PHP] array

2001-09-24 Thread Jeremy Morano
Hello everyone. I'm encountering difficulties using my arrays. while ($row = mysql_fetch_array($result)) { $link[$c] = $row['link']; $c = $c + 1; } This is where I try using it. while ($row = mysql_fetch_array($result)) { $date = $row['date'];

[PHP] Array Question

2001-09-13 Thread dhardison
Hi, I've got an array of items that I've sorted in descending order. I'd like to select the first ten items only from the array to place in a graph that's generated later in the script. Here's a sample array I'm trying to work with. Array ( [209.181.49.x] = 2 [64.225.143.x] =

<    6   7   8   9   10   11   12   13   >