Re: [PHP] PHP array unions

2012-09-14 Thread Adam Richardson
On Fri, Sep 14, 2012 at 2:30 AM, Matijn Woudt wrote: > > It doesn't need to be clunky.. just use array_flip and you've got the old > array again.. > Well, array_flip has it's own potential issues (duplicate values are lost, so my example of using zeros would not work.) I suppose I could duplicate

Re: [PHP] PHP array unions

2012-09-13 Thread Matijn Woudt
Op 14 sep. 2012 07:51 schreef "Adam Richardson" het volgende: > > On Wed, Sep 12, 2012 at 2:37 PM, Sebastian Krebs wrote: > > Hi, > > > > In PHP the array is in fact a hash map, but especially it is _used_ for > > nearly everything map-, set-, ...-like thing. So in short: The is no > > operator o

Re: [PHP] PHP array unions

2012-09-13 Thread Adam Richardson
On Wed, Sep 12, 2012 at 2:37 PM, Sebastian Krebs wrote: > Hi, > > In PHP the array is in fact a hash map, but especially it is _used_ for > nearly everything map-, set-, ...-like thing. So in short: The is no > operator or built-in function, that merges two arrays _and_ treat them as > set (instea

Re: [PHP] PHP array unions

2012-09-12 Thread Sebastian Krebs
Hi, In PHP the array is in fact a hash map, but especially it is _used_ for nearly everything map-, set-, ...-like thing. So in short: The is no operator or built-in function, that merges two arrays _and_ treat them as set (instead of the hashmap, what they are). Your solution is the way to g

Re: [PHP] php array in different OS

2010-07-27 Thread jose javier parra sanchez
you are probably getting a memory limit error, check your php.ini 2010/7/21 fyang : > Dear all, > I have a simple test code in different OS ,but it give me a different > result. > the code as follows: > $n= 5; > for($i=0;$i<$n;$i++) > { >$data[]=array(""

Re: [PHP] php array in different OS

2010-07-21 Thread fyang
em or need other configurations. Please give further guidance, thank you very much! best wishs, Yang Fei 2010-7-22 发件人: Bob McConnell 发送时间: 2010-07-21 20:06:36 收件人: fyang; php-general@lists.php.net 抄送: 主题: RE: [PHP] php array in different OS From: fyang > I have a sim

RE: [PHP] php array in different OS

2010-07-21 Thread Bob McConnell
From: fyang > I have a simple test code in different OS ,but it give me a different > result. > the code as follows: > $n= 5; > for($i=0;$i<$n;$i++) > { > $data[]=array("",$i,$i/1000); > echo $i," ",$data[$i][1],""; >

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread Yang Fei
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux t

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

[PHP] php array in different OS

2010-07-20 Thread fyang
Dear all, I have a simple test code in different OS ,but it give me a different result. the code as follows: "; } echo "count:",count($data); ?> OS1: Red Hat Enterprise Linux Server release 5.1 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux test resu

Re: [PHP] PHP: array with null shows different with print_r and var_dump

2008-04-02 Thread Robert Cummings
On Wed, 2008-04-02 at 12:19 +0530, Sanjay Mantoor wrote: > Hello, > > I am new to PHP and PHP community. > > Following program outputs different values with print_r and var_dump. > > $array = array(null, NULL); > > print_r($array); prints values like below > Array > ( > [0] => > [1] =>

Re: [PHP] PHP: array with null shows different with print_r and var_dump

2008-04-01 Thread Casey
On Tue, Apr 1, 2008 at 11:49 PM, Sanjay Mantoor <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to PHP and PHP community. > > Following program outputs different values with print_r and var_dump. > > $array = array(null, NULL); > > print_r($array); prints values like below > Array > ( >

[PHP] PHP: array with null shows different with print_r and var_dump

2008-04-01 Thread Sanjay Mantoor
Hello, I am new to PHP and PHP community. Following program outputs different values with print_r and var_dump. $array = array(null, NULL); print_r($array); prints values like below Array ( [0] => [1] => ) where as var_dump($array) prints values like below array(2) { [0]=> NULL

Re: [PHP] PHP array entries max limit

2008-01-17 Thread Richard Lynch
On Wed, January 16, 2008 11:02 pm, Prabath Kumarasinghe wrote: > I would like to know how many entries does PHP associative array can > handle. As far as I know, the answer is: How much RAM do you have? -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some i

Re: [PHP] PHP array entries max limit

2008-01-17 Thread Per Jessen
Prabath Kumarasinghe wrote: > Hi All > > I would like to know how many entries does PHP associative array can > handle. Why don't you just test it? for( $i=0; ; $i++ ) { $kk[$i]=1; } Attempt#1 - 13 keys, stopped due to memory limit *M. Attempt#2 - 838 keys, memlimit 512M. Attem

[PHP] PHP array entries max limit

2008-01-16 Thread Prabath Kumarasinghe
Hi All I would like to know how many entries does PHP associative array can handle. Cheers Prabath

[PHP] php array and java fold out menu

2005-07-29 Thread Gregory Machin
Hi . Please could you advise. I'm insearch of a java fold out menu that looks good, and can acept an array containg the links and link names etc from a php array ... i havent worked in java script yet so please help :-)... Many thanks -- Gregory Machin [EMAIL PROTECTED] [EMAIL PROTECTED] www.li

Re: [PHP] PHP Array question

2005-02-15 Thread Matt M.
> What I want to do is to only show 20 pictures at a time with a "Next" link > and a "Previous" link. For the first 20 only the "Next" link would show and > whenever the last set would show only the "Previous" link would. Every other > time both would show. > > Can someone point me in the right di

[PHP] PHP Array question

2005-02-15 Thread R. Van Tassel
I have an array with image names like: $arrayone = array("1.jpg", "2.jpg"); $arraytwo = array("a.jpg", "b.jpg"); Then I have a variable for each to count the number of elements: $arrayoneElements = count($arrayone); $arraytwoElements = count($arraytwo); I'm using the element

RE: [PHP] php array question

2004-11-01 Thread Zareef Ahmed
>-Original Message- >From: Victor C. [mailto:[EMAIL PROTECTED] >Sent: Tuesday, November 02, 2004 3:06 AM >To: [EMAIL PROTECTED] >Subject: [PHP] php array question > > >Hi, >I have a line of php that I don't really understand. > >foreach($this->

[PHP] php array question

2004-11-01 Thread Victor C.
Hi, I have a line of php that I don't really understand. foreach($this->orders as $OrderID => $value) { echo $OrderID.""; $OrderObject =$this->orders[$OrderID=>$value]; echo $OrderObject->OrderID."<--all the same"; } I know that $this->orders is an array of "order" objects. the resul

Re: [PHP] php array

2002-03-12 Thread Jim Lucas [php]
t;[EMAIL PROTECTED]> To: "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 the

RE: [PHP] php array

2002-03-12 Thread Demitrious S. Kelly
Something like this: -Original Message- From: Rodrigo Peres [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'

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

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), fnam

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

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

RE: [PHP] PHP array information.

2001-07-09 Thread scott [gts]
y, July 09, 2001 12:39 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP array information. > > > > Hello: > > My apologies if this has been covered before, or if i have missed it on > the php manual web pages. I am looking for some information on how to do > a perl li

[PHP] PHP array information.

2001-07-09 Thread Chris Oxenreider
Hello: My apologies if this has been covered before, or if i have missed it on the php manual web pages. I am looking for some information on how to do a perl like array with a *sql call in PHP. Here is what I want to do: table: problem_class _rid (tinyint) description (mediumtext)