Re: [PHP] While on the topic of PHP Web Site Stats - SharePoint...

2011-09-19 Thread Daniel Brown
On Mon, Sep 19, 2011 at 18:22, George Langley wrote: >        Hi all. Had a meeting today where I was rather condescendingly told > that most CMS web sites use SharePoint. Well, you may reply, equally condescendingly, that you will need that to have cited references, as it's simply incorrect

[PHP] While on the topic of PHP Web Site Stats - SharePoint...

2011-09-19 Thread George Langley
Hi all. Had a meeting today where I was rather condescendingly told that most CMS web sites use SharePoint. Last I checked: Wordpress, Joomla! and Drupal (PHP, PHP and oh look, PHP) kind of had the CMS market wrapped up, with numerous other systems figh

[PHP] Re: [Bulk] Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-13 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote: Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve

Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-13 Thread Ashley Sheridan
On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote: > Ashley Sheridan a écrit : > > On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: > > > >> Hi! > >> I'm stuck. > >> I don't understand why the php CLI dies after 3 hours in my script. > >> Any idea to solve? > >> Thanks >

Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Robert Cummings
Jean-Pierre Arneodo wrote: Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7

[PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubunt

RE: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread kyle.smith
tput stream 2 [stderr] to the same place as stream 1") Hope any of these crazy ideas are helpful... - Kyle -- Kyle Smith Unix Systems Administrator -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Thursday, June 11, 2009 8:25 AM To: Ford, Mike Cc: php-gener

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Robert Cummings
Ford, Mike wrote: On 11 June 2009 12:00, Ashley Sheridan advised: On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Eddie Drapkin
try set_time_limit(0) ? On Thu, Jun 11, 2009 at 8:05 AM, Ford, Mike wrote: > On 11 June 2009 12:00, Ashley Sheridan advised: > > > On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: > >> Hi! > >> I'm stuck. > >> I don't understand why the php CLI dies after 3 hours in my script. > Any

RE: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Ford, Mike
On 11 June 2009 12:00, Ashley Sheridan advised: > On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: >> Hi! >> I'm stuck. >> I don't understand why the php CLI dies after 3 hours in my script. Any >> idea to solve? Thanks >> >> >> PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (b

Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Ashley Sheridan
On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: > Hi! > I'm stuck. > I don't understand why the php CLI dies after 3 hours in my script. > Any idea to solve? > Thanks > > > PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 > 20:06:36) > Linux ubuntu 2.6.24-19

[PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubuntu 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux Conf [php.ini] max_

Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> setting: > > max_execution_time = -1     ; Maximum execution time of each script, in > seconds > max_input_time = -1    ; Maximum amount of time each script may spend > parsing request data > ;max_input_nesting_level = 64 ; Maximum input variable nesting level > memory_limit = 2036M      ; Maximu

Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> Does any one knows why while loop below ends after few loops when it meant > to keep in loop? > > File name: while_loop_script.php > > define('run', 0); > define('START', 10); > > while(START >run){ > > $ch = curl_init("mydomain/update_script.php?action=run"); > curl_exec($ch); > curl_close($ch);

Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
o.in | Cell: +91 94033 66714 | Tel: +91 (0832) >> 30 79014 >> Innovation in software product design, development and delivery- >> www.persistentsys.com >> >> >> >> >> -Original Message- >> From: Andrew Williams [mailto:andrew4willi...@gmail

Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
ew Williams [mailto:andrew4willi...@gmail.com] > Sent: Monday, April 06, 2009 3:51 PM > To: php-general@lists.php.net > Subject: [PHP] [php] while loop failure > > Does any one knows why while loop below ends after few loops when it meant > to keep in loop? > > File n

RE: [PHP] [php] while loop failure

2009-04-06 Thread Chetan Rane
Innovation in software product design, development and delivery- www.persistentsys.com -Original Message- From: Andrew Williams [mailto:andrew4willi...@gmail.com] Sent: Monday, April 06, 2009 3:51 PM To: php-general@lists.php.net Subject: [PHP] [php] while loop failure Does any one knows why

[PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
Does any one knows why while loop below ends after few loops when it meant to keep in loop? File name: while_loop_script.php define('run', 0); define('START', 10); while(START >run){ $ch = curl_init("mydomain/update_script.php?action=run"); curl_exec($ch); curl_close($ch); } using php.exe to

RE: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Arno Kuhl
-Original Message- From: Andrew Williams [mailto:andrew4willi...@gmail.com] Sent: 27 March 2009 10:12 AM To: PHP LIST Subject: [PHP] WHILE LOOP PROBLEM can some tell why the below loop stop running after some time. $start=10; const run=0; while($start >run){ //do somthing } --

Re: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Craig Whitmore
On Fri, 2009-03-27 at 08:11 +, Andrew Williams wrote: > can some tell why the below loop stop running after some time. > > $start=10; > const run=0; > while($start >run){ > > //do somthing > > } > max_execution_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Andrew Williams
can some tell why the below loop stop running after some time. $start=10; const run=0; while($start >run){ //do somthing } -- Best Wishes Andrew Williams

Re: [PHP] while-question

2008-11-19 Thread Shawn McKenzie
bruce wrote: > interesting points regarding college and programming.. > > my degrees bsee/msee covered alot more than pure programing.. as a double > ee/cs, the ability to articulate an issue/problem, and bring to mind a cogent > thought process was valuable. the ability to understand how differ

RE: [PHP] while-question

2008-11-19 Thread bruce
: php-general@lists.php.net Subject: RE: [PHP] while-question > Dabbling? > > I think that making a living from it isn't dabbling, so I may not be > qualified to speak for the dabblers. > > But for me, I was writing code before there were such courses. Later, > when

Re: [PHP] while question

2008-11-18 Thread Ashley Sheridan
On Tue, 2008-11-18 at 10:52 +, Nathan Rixham wrote: > Ashley Sheridan wrote: > > On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: > >> Ashley Sheridan wrote: > >>> On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: > >>> > Only thing to note with the foreach is that you are

Re: [PHP] while-question

2008-11-18 Thread Robert Cummings
On Tue, 2008-11-18 at 14:33 +, Nathan Rixham wrote: > Craige Leeder wrote: > > Jochem Maas wrote: > >> klieder ... kliederen > >> > >> the E sound is short. > >> > >> > > Interesting to know. Thanks :D > > > > - Craige > > don't believe him, "jochem" is really called Bob Davis, a slightly

Re: [PHP] while-question

2008-11-18 Thread Bastien Koert
On Tue, Nov 18, 2008 at 9:33 AM, Nathan Rixham <[EMAIL PROTECTED]> wrote: > Craige Leeder wrote: > >> Jochem Maas wrote: >> >>> klieder ... kliederen >>> >>> the E sound is short. >>> >>> >>> >> Interesting to know. Thanks :D >> >> - Craige >> > > don't believe him, "jochem" is really called Bob D

Re: [PHP] while-question

2008-11-18 Thread Nathan Rixham
Craige Leeder wrote: Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige don't believe him, "jochem" is really called Bob Davis, a slightly balding middle aged ASP developer from hull sent to infiltrate the PHP community and misguide

Re: [PHP] while-question

2008-11-18 Thread Craige Leeder
Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while-question

2008-11-18 Thread Jochem Maas
Craige Leeder schreef: > Jochem Maas wrote: >> just for laughs .. given the 'dabble' thread "Cleeder" is phonetically >> very very close to a dutch word meaning 'messing around' .. rather in >> the way >> a 2yo might mess around with a bowl of yogurt. >> > Haha, now that does make me laugh. Out

Re: [PHP] while-question

2008-11-18 Thread Craige Leeder
Jochem Maas wrote: just for laughs .. given the 'dabble' thread "Cleeder" is phonetically very very close to a dutch word meaning 'messing around' .. rather in the way a 2yo might mess around with a bowl of yogurt. Haha, now that does make me laugh. Out of curiosity, what is the actual word f

Re: [PHP] while-question

2008-11-18 Thread Nathan Rixham
tedd wrote: At 7:02 PM -0500 11/17/08, Craige Leeder wrote: I'm not illiterate; promise :p - Craige Yeah, his parents were married before he was born. Cheers, tedd omg tedd, I was just reading this thread over, thought exactly that witty response, clicked you're reply and there it is;

Re: [PHP] while question

2008-11-18 Thread Nathan Rixham
Ashley Sheridan wrote: On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it b

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: > Jochem Maas wrote: >> must . resist >> >> "I take you didn't score to hig on the spelling test? and collage, >> is that the the cut-n-paste school of IT?" >> >> dang it, failed. ;-) >> > > > Haha! 'high' was just my 'h' key not pressing, and college is j

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: > At 12:52 AM +0100 11/18/08, Jochem Maas wrote: >> Craige Leeder schreef: >> > I'm 100% self taught for now. I'm just out of higschool, and hopefully >>> going off to collage next year. >> >> must . resist >> >> "I take you didn't score to hig on the spelling test? and co

Re: [PHP] while question

2008-11-17 Thread Micah Gersten
Jay Blanchard wrote: > [snip] > ...foreach... > [/snip] > > You could also use a for loop if you wanted to count; > > for($i = 0; $i < count($array); $i++){ >echo $i . "\n"; > } > > > This is not good because you are calling count every loop iteration. Thank you, Micah Gersten onShore Netw

Re: [PHP] while-question

2008-11-17 Thread tedd
At 7:02 PM -0500 11/17/08, Craige Leeder wrote: I'm not illiterate; promise :p - Craige Yeah, his parents were married before he was born. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] while-question

2008-11-17 Thread tedd
At 12:52 AM +0100 11/18/08, Jochem Maas wrote: Craige Leeder schreef: > I'm 100% self taught for now. I'm just out of higschool, and hopefully going off to collage next year. must . resist "I take you didn't score to hig on the spelling test? and collage, is that the the cut-n-pas

Re: [PHP] while question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: > Ashley Sheridan wrote: >> On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: >> >>> Only thing to note with the foreach is that you are actually working >>> on a copy of the array, so if you intend to modify it, pass it by >>> reference. >>> >>> - Craige >>> >>

Re: [PHP] while-question

2008-11-17 Thread Craige Leeder
Jochem Maas wrote: must . resist "I take you didn't score to hig on the spelling test? and collage, is that the the cut-n-paste school of IT?" dang it, failed. ;-) Haha! 'high' was just my 'h' key not pressing, and college is just one of those words I have trouble with.

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: > At 10:00 AM -0800 11/17/08, bruce wrote: >> curious qiestion >> >> to all on here who dabble in php... how many of you have actully gone to >> college, taken algorithm courses, microprocessor courses, >> design/architecture courses, etc.. >> >> or is the majority of the work her

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: > bruce wrote: >> curious qiestion >> >> to all on here who dabble in php... how many of you have actully gone to >> college, taken algorithm courses, microprocessor courses, >> design/architecture courses, etc.. >> >> or is the majority of the work here from people who'v

Re: [PHP] while-question

2008-11-17 Thread Craige Leeder
bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the tools and started programmin

Re: [PHP] while question

2008-11-17 Thread Ashley Sheridan
On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: > Ashley Sheridan wrote: > > On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: > > > >> Only thing to note with the foreach is that you are actually working on > >> a copy of the array, so if you intend to modify it, pass it by refer

Re: [PHP] while question

2008-11-17 Thread Craige Leeder
Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it by reference. - Craige Can you do that? I assume it would look like this:

Re: [PHP] while question

2008-11-17 Thread Ashley Sheridan
On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: > Alain Roger wrote: > > Hi, > > > > i'm on PHP training and our lector is telling us that to avoid counting an > > array item amout thanks count($my_array), he tells we can do: > > while($my_array) > > { > > ... do something > > } > > but fr

Re: [PHP] while question

2008-11-17 Thread Craige Leeder
Alain Roger wrote: Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = coun

RE: [PHP] while-question

2008-11-17 Thread tedd
At 2:55 PM -0500 11/17/08, Wolf wrote: Tedd, glad you got hooked on Phonics. One of these days I hope from graduating from just looking at the pictures, but right now the pictures are oh so enticing!. ;) Wolf Wolf: Lot's of exciting things -- hard to keep up on bots, automated buying, da

RE: [PHP] while-question

2008-11-17 Thread Wolf
> Dabbling? > > I think that making a living from it isn't dabbling, so I may not be > qualified to speak for the dabblers. > > But for me, I was writing code before there were such courses. Later, > when I went to college I was taught adventures in keypunching and > received several "next to

RE: [PHP] while-question

2008-11-17 Thread tedd
At 10:00 AM -0800 11/17/08, bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the tools and started programmin

Re: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 19:07 +0100, Jochem Maas wrote: > Robert Cummings schreef: > > On Mon, 2008-11-17 at 14:54 +, Stut wrote: > >> On 17 Nov 2008, at 14:31, Nathan Rixham wrote: > >>> if you really want a challenge try this one.. > >>> > >>> task: add the numbers 5 and 17 together, using php,

RE: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 10:00 -0800, bruce wrote: > curious qiestion > > to all on here who dabble in php... how many of you have actully gone to > college, taken algorithm courses, microprocessor courses, > design/architecture courses, etc.. > > or is the majority of the work here from people

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Robert Cummings schreef: > On Mon, 2008-11-17 at 14:54 +, Stut wrote: >> On 17 Nov 2008, at 14:31, Nathan Rixham wrote: >>> if you really want a challenge try this one.. >>> >>> task: add the numbers 5 and 17 together, using php, without using >>> the + operator. fill it in: >>> >>> function

RE: [PHP] while-question

2008-11-17 Thread bruce
mming... ? -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:53 AM To: Stut Cc: Nathan Rixham; php-general@lists.php.net Subject: Re: [PHP] while-question On Mon, 2008-11-17 at 14:54 +, Stut wrote: > On 17 Nov 2008, at 14:31, Nathan Rixh

Re: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 14:54 +, Stut wrote: > On 17 Nov 2008, at 14:31, Nathan Rixham wrote: > > if you really want a challenge try this one.. > > > > task: add the numbers 5 and 17 together, using php, without using > > the + operator. fill it in: > > > > function add($a , $b) { > > //code he

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) { //code here but no + - / * operators return $answer; } echo add(5, 1

Re: [PHP] while-question

2008-11-17 Thread Andrew Ballard
On Mon, Nov 17, 2008 at 9:47 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > Nathan Rixham schreef: >> Jochem Maas wrote: >>> $a = range(1,10); >>> for ($i = 0, $c = count($a); $i < $c; print($a[$i]."\n"), $i++); >> >> think the point of this is to count the items in an array without count >> mate :p

Re: [PHP] while-question

2008-11-17 Thread Stut
On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) { //code here but no + - / * operators return $answer; } echo add(5, 17); Elemen

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Nathan Rixham schreef: > Jochem Maas wrote: >> $a = range(1,10); >> for ($i = 0, $c = count($a); $i < $c; print($a[$i]."\n"), $i++); > > think the point of this is to count the items in an array without count > mate :p no point in the above you could just: > $c = count($a); I thought the point wa

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
Jochem Maas wrote: $a = range(1,10); for ($i = 0, $c = count($a); $i < $c; print($a[$i]."\n"), $i++); think the point of this is to count the items in an array without count mate :p no point in the above you could just: $c = count($a); foreach! $a = range(1,10); $c = 0; foreach($a as $b) {

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Timo Erbach schreef: > ...but for best performance you should do: > > > $counter = count($array); > for($i = 0; $i < $counter; $i++){ > echo $i . "\n"; > } just for fun: $a = range(1,10); for ($i = 0, $c = count($a); $i < $c; print($a[$i]."\n"), $i++); ... gives an idea of the power and flex

[PHP] while-question

2008-11-17 Thread Timo Erbach
...but for best performance you should do: $counter = count($array); for($i = 0; $i < $counter; $i++){ echo $i . "\n"; } So the expression count() in the for()-loop is only parsed once and not every loop. Regards Timo [snip] ...foreach... [/snip] You could also use a for loop if you want

RE: [PHP] while question

2008-11-17 Thread Jay Blanchard
[snip] ...foreach... [/snip] You could also use a for loop if you wanted to count; for($i = 0; $i < count($array); $i++){ echo $i . "\n"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while question

2008-11-17 Thread Thodoris
Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = count($my_array); whil

Re: [PHP] while question

2008-11-17 Thread Stut
On 17 Nov 2008, at 13:01, Alain Roger wrote: i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always someth

[PHP] while question

2008-11-17 Thread Alain Roger
Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = count($my_array); while($

Re: [PHP] while

2008-02-23 Thread Richard Lynch
On Sat, February 23, 2008 10:16 am, Emiliano Boragina wrote: > > $buscar = $_REQUEST['buscar']; > > $base = "inscripcion"; > > $conexion = mysql_connect ( 'localhost' , 'root' , 'root' ); > > mysql_select_db ( $base , $conexion ); > > echo ""; > >

Re: [PHP] while

2008-02-23 Thread Andrew Ballard
On Sat, Feb 23, 2008 at 11:16 AM, Emiliano Boragina <[EMAIL PROTECTED]> wrote: > Hi everyone > > I am beginner > > I have the following code: > > > > > $buscar = $_REQUEST['buscar']; > > $base = "inscripcion"; > > $conexion = mysql_connect ( 'localhost' , 'root' , 'ro

[PHP] while

2008-02-23 Thread Emiliano Boragina
Hi everyone I am beginner I have the following code: "; $resultado = mysql_query ("select * from alumnos where Curso like '$buscar'" , $conexion); while ( $registro = mysql_fetch_row ($resultado)) { echo ""; foreach ( $registro as $c

Re: [PHP] while-do +array

2007-10-31 Thread Robin Vickery
On 31/10/2007, Steven Macintyre <[EMAIL PROTECTED]> wrote: > Hiya, > > I have the following code ... which only seems to result in one item ... > which is incorrect ... can anyone spot my problem? > > if ($armbase != "") { > $options = explode(",", $armbase); >

RE: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 16:20 +0200, Steven Macintyre wrote: > > Your subject line says "while-do" + array, following code contains > > a > > "do-while" loop. > > Apologies :) > > > We can't debug the script very well without a > > sample > > input since we don't know how many times the loop "shou

RE: [PHP] while-do +array

2007-10-31 Thread Steven Macintyre
> Your subject line says "while-do" + array, following code contains > a > "do-while" loop. Apologies :) > We can't debug the script very well without a > sample > input since we don't know how many times the loop "should" run. To > debug > yourself, try using print_r() to see exactly what the f

Re: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 13:02 +0200, Steven Macintyre wrote: > Hiya, > > I have the following code ... which only seems to result in one item ... > which is incorrect ... can anyone spot my problem? Your subject line says "while-do" + array, following code contains a "do-while" loop. We can't debug

[PHP] while-do +array

2007-10-31 Thread Steven Macintyre
Hiya, I have the following code ... which only seems to result in one item ... which is incorrect ... can anyone spot my problem? if ($armbase != "") { $options = explode(",", $armbase); $text .= ''; $get_endRow = 0; $get_co

RE: [PHP] While and echoing HTML

2005-05-10 Thread Jared Williams
> > I guess it is the missing semicolon. > > > And you can write: > > echo "" > > as simply > > echo "$product_type" > I prefer echo '', $product_type, ''; No string concatenation, or variable replacement required. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] While and echoing HTML

2005-05-10 Thread Burhan Khalid
Mary-Anne Nayler wrote: Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Mark: Since you are not displaying the counter, you really don't need to mess with $i. You can reduce your code to just : $db = mysql_connect("localhost", "r

Re: [PHP] While and echoing HTML

2005-05-10 Thread Richard Lynch
On Mon, May 9, 2005 10:57 pm, Mark Sargent said: > Thanx. I saw the extra echo and removed it. Problem with that code, > though. It displays only the 1st record, repeatedly, causing the browser > to hang. Can anyone see what is wrong..? Cheers. Everybody else has told you to move the $i++; inside

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Mary-Anne Nayler wrote: oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page,

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Cheers, Mary-Anne Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmasterhelp.com/tutorials/phpmysql/5 has the below code, $first=mysql_result($result,$i,"fir

Re: [PHP] While and echoing HTML

2005-05-10 Thread darren kirby
quoth the Mark Sargent: > > > Jumbo Status > $db = mysql_connect("localhost", "root", "grunger"); > mysql_select_db("status",$db); > $result = mysql_query("SELECT ProductTypes.product_type_detail FROM > ProductTypes",$db); > $myrow = mysql_fetch_array($result); > $num = mysql_num_rows($result);

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmaster

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Prathaban Mookiah wrote: I guess it is the missing semicolon. And you can write: echo "" as simply echo "$product_type" Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 13:23:51

Re: [PHP] While and echoing HTML

2005-05-09 Thread =?iso-8859-1?q?Fabian_M=FCller?=
Mark Sargent <[EMAIL PROTECTED]> writes: > $i=0; > while ($i < $num){ > $product_type=mysql_result($result,$i,"product_type_detail"); > echo "" > } > $i++ You should put "$i++" into the while loop. And you should add an ";" at the end of the echo line as well as at the end of "$i++". With kind r

Re: [PHP] While and echoing HTML

2005-05-09 Thread Prathaban Mookiah
I guess it is the missing semicolon. And you can write: echo "" as simply echo "$product_type" Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 13:23:51 +0900 Subject: [P

[PHP] While and echoing HTML

2005-05-09 Thread Mark Sargent
Hi All, this page, http://www.freewebmasterhelp.com/tutorials/phpmysql/5 has the below code, $first=mysql_result($result,$i,"first"); $last=mysql_result($result,$i,"last"); $phone=mysql_result($result,$i,"phone"); $mobile=mysql_result($result,$i,"mobile"); $fax=mysql_result($result,$i,"fax"); $ema

Re: [PHP] while loop

2005-02-23 Thread Jochem Maas
Reinhart Viane wrote: Well I'm able to do that, there are only 4 different types, but the 4 queries have exactly the same syntax so I think it's better to combine them. Not? what about using UNION on the four queries? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] while loop

2005-02-23 Thread Marek Kilimajer
ijk bericht- Van: Justin Lilly [mailto:[EMAIL PROTECTED] Verzonden: woensdag 23 februari 2005 18:57 Aan: php-general@lists.php.net Onderwerp: Re: [PHP] while loop Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the s

RE: [PHP] while loop

2005-02-23 Thread Reinhart Viane
hp-general@lists.php.net Onderwerp: Re: [PHP] while loop Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the sorting -much- easier. I'm not sure if that's an option, but if it is, I'd consider exploring

Re: [PHP] while loop

2005-02-23 Thread Justin Lilly
Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the sorting -much- easier. I'm not sure if that's an option, but if it is, I'd consider exploring it. select * from activities where act_date >= NOW() && act_type_id = 1

Re: [PHP] while loop

2005-02-23 Thread Richard Lynch
Reinhart Viane wrote: > Hey list > > I have a mysql table like this: > > Act_name Act_type_id Act_date > > Heyhey 1 22-06-05 > > Aloha2 22-06-05 > > Tralala 2 22-06-05 > > Wuhu

Re: [PHP] while loop

2005-02-23 Thread Burhan Khalid
Reinhart Viane wrote: Hey list I have a mysql table like this: [ snipped ] Now I retrieve all activities happening in the future with this query: $sqlact="select * from activities where act_date >= NOW() order by act_type_id”; $getact=mysql_query($sqlact) What I’m trying to do now is: F

[PHP] while loop

2005-02-23 Thread Reinhart Viane
Hey list   I have a mysql table like this:   Act_name   Act_type_id Act_date Heyhey     1  22-06-05 Aloha        2  22-06-05 Tralala       2  22-06-05 Wuhu        1  

Re: [PHP] while inside a function

2004-12-05 Thread Louie Miranda
sorry, i overlooked on something. i need to rest for a while, im working on a wrong program thats why it wont work. heh, :(. thanks again. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while inside a function

2004-12-05 Thread Raditha Dissanayake
Louie Miranda wrote: i have a while statement inside a function, but it seems like it dont work. is this possible? Add the following lines: global $apo; global $row; This will make it work for you but it's not the best solution. It's better to pass in parameters to the function rather than to r

[PHP] while inside a function

2004-12-05 Thread Louie Miranda
i have a while statement inside a function, but it seems like it dont work. is this possible? function hello() { while ($apo->fetchInto($row)) { print "hello 2"; } }; /eof -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] while inside a while or join or...

2004-05-16 Thread John W. Holmes
T. H. Grejc wrote: Hallo, I know of a few ways of doing this but I am not sure that any is right. I want to consult with you what is the best way of doing this: Table 1: ++-+ | *a* | *b* | ++-+ | 2 | 1| ++-+ | 2 | 2| ++-+ Table 2: ++-+ | *b*

Re: [PHP] while inside a while or join or...

2004-05-16 Thread Curt Zirzow
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]): > Hallo, > > I know of a few ways of doing this but I am not sure that any is right. > I want to consult with you what is the best way of doing this: > > ... > > I would like to select all 'b' from Table_1 WHERE a = '2' and then to > select all 'd'

Re: [PHP] while inside a while or join or...

2004-05-16 Thread Rachel Rodriguez
> > I would like to select all 'b' from Table_1 WHERE a > = '2' and then to > select all 'd' from table_2 with 'b' from previous > result. > > Table 2 is the Table with UserNames (d) and Table 1 > is the table with > 'marked' UserID's (b). > If I understand you correctly, its sounds like you

[PHP] while inside a while or join or...

2004-05-16 Thread T. H. Grejc
Hallo, I know of a few ways of doing this but I am not sure that any is right. I want to consult with you what is the best way of doing this: Table 1: ++-+ | *a* | *b* | ++-+ | 2 | 1| ++-+ | 2 | 2| ++-+ Table 2: ++-+ | *b* | *d* | ++

Re: [PHP] 'while' not picking up on first DB record

2003-09-17 Thread Miles Thompson
Please don't cross-post. See below - M. At 10:17 AM 9/17/2003 -0400, Roger Spears wrote: Hello, Can anyone from the lists please tell me why this bit of code is not picking up on the first record in the database? If the 'id' I'm looking for is '1' it doesn't populate the _SESSION variables. An

  1   2   >