Re: [PHP] Static utility class?

2013-09-04 Thread Robert Cummings
On 13-09-04 09:06 PM, Micky Hulse wrote: Hi Rodrigo, thanks for the help, I really appreciate it! On Wed, Sep 4, 2013 at 5:55 PM, Rodrigo Santos wrote: Hi, first, sorry for the bad English. Not bad at all! Very clear and well written reply (heck, it's better than my native English writing),

Re: [PHP] Static utility class?

2013-09-05 Thread Robert Cummings
On 13-09-05 02:27 PM, Micky Hulse wrote: On Wed, Sep 4, 2013 at 11:07 PM, Robert Cummings wrote: I'll second Rodrigo's opinion, but would like to comment that the name of the class is misleading since it's called "Singleton". The singleton pattern is used wh

Re: [PHP] Apache

2013-09-25 Thread Robert Stone
Period. > >Have nice days, >Niklaus > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php Thanks, Ash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Sorry for this late post but I'm amazed nobody consulted the doco. The php.net site has a whole section titled "Handling File Uploads". Also check out finfo_open and finfo_file. If your are a windoze user you need a dll. If you want Apache to handle PUT requests you MUST tell it to run a script as it cannot write to web root. HTH Robert

Re: [PHP] framework or not

2013-10-22 Thread Robert Cummings
On 13-10-22 05:38 PM, Larry Garfield wrote: If you need more convincing, I will cite Fred Brooks: http://www.cs.nott.ac.uk/~cah/G51ISS/Documents/NoSilverBullet.html Excellent article, thanks for the pointer. So many assertions have stood the test of time thus far. Cheers, Rob. -- E-Mail Dis

Re: [PHP] framework or not

2013-10-26 Thread Robert Cummings
On 13-10-24 09:41 PM, Larry Garfield wrote: On 10/23/2013 08:51 AM, Jay Blanchard wrote: [snip] a bitter rant[/snip] Dang Larry - bad night? That wasn't a bitter rant. You haven't seen me bitter. :-) That was "tough love" to the OP. I don't see a reason to pussyfoot around the orig

[PHP] unable to allocate memory for pool (php 5.2.16)

2011-01-06 Thread robert mena
Hi, My system got upgraded with the rpm version of php 5.2.16 and since them I am getting errors with 'Unable to allocate memory for pool'. Reverting php to the older version solves the problem and while using the 5.2.16 the problems does not seem to occur with a specific pattern, i.e sometimes

Re: [PHP] Command line PHP

2011-01-07 Thread Robert Cummings
On 11-01-07 01:31 PM, Joshua Kehn wrote: On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote: On Fri, Jan 7, 2011 at 12:18, Joshua Kehn wrote: Using another language more suited towards CLI / standalone (non-web) development would be easier. PHP at it's core is a templating language. I don't t

Re: [PHP] Command line PHP

2011-01-07 Thread Robert Cummings
On 11-01-07 11:55 AM, la...@garfieldtech.com wrote: Hi folks. I have a project coming up that will involve writing a non-trivial command line PHP application. Most of it will be nice and abstracted and standalone and all of that jazz, but it will need to do command line interation. I'm not sur

Re: [PHP] Command line PHP

2011-01-07 Thread Robert Cummings
On 11-01-07 02:33 PM, Robert Cummings wrote: On 11-01-07 11:55 AM, la...@garfieldtech.com wrote: Hi folks. I have a project coming up that will involve writing a non-trivial command line PHP application. Most of it will be nice and abstracted and standalone and all of that jazz, but it will

Re: [PHP] Command line PHP

2011-01-07 Thread Robert Cummings
On 11-01-07 02:53 PM, tedd wrote: At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote: On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn wrote: Why bother learning other languages? Is this a joke? Why should someone stop learning *ever?** *Having a mastery of multiple languages can only enhance you

Re: [PHP] Command line PHP

2011-01-07 Thread Robert Cummings
On 11-01-07 03:24 PM, Nathan Nobbe wrote: much of the gripe comparing php to python over the years is slowly fading with the advent of new features of php, most notably closures. once traits are available im sure the multiple inheritance that python offers will be less of an advantage over php's

Re: [PHP] Command line PHP

2011-01-11 Thread Robert Cummings
On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Have you tried setting the stream to non-blocking to prevent the need for the return key? C

Re: [PHP] Command line PHP

2011-01-11 Thread Robert Cummings
On 11-01-11 11:55 AM, Richard Quadling wrote: On 11 January 2011 16:43, Robert Cummings wrote: On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you

Re: [PHP] Command line PHP

2011-01-11 Thread Robert Cummings
On 11-01-11 12:14 PM, Donovan Brooke wrote: tedd wrote: At 1:54 PM -0500 1/7/11, Joshua Kehn wrote: Why should someone stop learning ever? Because my head fills up. I have to wait until I forget something before I can learn something new. The up-side is that I'm learning something new almos

Re: [PHP] First PHP job

2011-01-11 Thread Robert Cummings
On 11-01-11 12:15 PM, David Harkness wrote: On Tue, Jan 11, 2011 at 4:19 AM, Jay Blanchardwrote: I am always looking for the $needle in the $haystack. Just sayin' I often find it faster to hire a bunch of horses to eat the $haystack, leaving the $needle behind and easy to find. My hor

Re: [PHP] First PHP job

2011-01-11 Thread Robert Cummings
On 11-01-11 01:15 PM, tedd wrote: At 4:12 PM -0200 1/11/11, Jo“o C’ndido de Souza Neto wrote: It must be a big joke!!! No really, his horse has serious problems. It's not good to find needles that way. I've nicknamed him Porcuphiney. Cheers, Rob. Ps. for those with limited english co

Re: [PHP] Bar Charts in PDFs

2011-02-11 Thread Robert Cummings
On 11-02-11 11:19 AM, sono...@fannullone.us wrote: On Feb 11, 2011, at 2:08 AM, Mattias Geniar wrote: Have a look at the library called 'pChart': http://pchart.sourceforge.net/ While it's a bit old... Actually, it's been updated to v2.1 now. It looks pretty nice. http://www.pchart.n

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-13 Thread Robert Cummings
On 11-02-13 02:25 PM, tedd wrote: At 10:53 AM +0530 2/12/11, Ashim Kapoor wrote: Dear All, I am reading "PHP5 and MySQL Bible". Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that confl

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Robert Cummings
On 11-02-15 04:03 PM, Brian Dunning wrote: Hey all - I've got long articles, the HTML for which comes out of MySQL. Works great. I want to split it up so that I can insert ad blocks at various points within it. The articles are all pretty long but they're of variable length. I want to chop th

Re: [PHP] Howdy (new in here)

2011-02-15 Thread Robert Cummings
On 11-02-15 04:08 PM, Steve Staples wrote: Tedd: Your bracing style is WRONG. Whitesmiths Style sucks... and Allman Style is the best way to do it. :) My personal bracing style is the Allman Style... I've been doing it that way forever, it just made sense to me (even before I knew there was

Re: [PHP] Howdy (new in here)

2011-02-15 Thread Robert Cummings
On 11-02-15 04:59 PM, Brian Waters wrote: On Tue, Feb 15, 2011 at 4:50 PM, Robert Cummings wrote: I started with K&R and quickly migrated to Allman style. The advantage I see with Allman is that the braces form a visual pocket into which the associated code gets placed :) What about K&a

Re: [PHP] errors after upgrade vom 5.2.10 to 5.3.0 howto solve or hide?

2011-02-16 Thread Robert Cummings
On 11-02-16 09:45 AM, Daniel P. Brown wrote: On Wed, Feb 16, 2011 at 09:41, David Hutto wrote: On Wed, Feb 16, 2011 at 9:41 AM, David Hutto wrote: Only those who live in glass houses, should hide their errors. if that makes sense. Did you even bother to read the whole of what I sai

Re: [PHP] PHP+MySQL question

2011-02-16 Thread Robert Cummings
On 11-02-16 11:37 AM, דניאל דנון wrote: Hi. I have a table called "images" with 4 columns - `image_id`, `item_name`, `image_url`, `image_views` (Where image_id is UNIQUE and AUTO-INCREMENT). Sometimes, there might be many items with the same name (but not with the same url). I want to make su

Re: [PHP] PHP+MySQL question

2011-02-16 Thread Robert Cummings
On 11-02-16 11:55 AM, Robert Cummings wrote: On 11-02-16 11:37 AM, דניאל דנון wrote: Hi. I have a table called "images" with 4 columns - `image_id`, `item_name`, `image_url`, `image_views` (Where image_id is UNIQUE and AUTO-INCREMENT). Sometimes, there might be many items wit

Re: [PHP] Howdy (new in here)

2011-02-18 Thread Robert Cummings
On 11-02-16 06:36 PM, Tamara Temple wrote: On Feb 15, 2011, at 11:23 PM, Brian Waters wrote: On Tue, Feb 15, 2011 at 11:46 PM, Tamara Temple wrote: I was unlucky enough to find someone who coded a function that went on for 30 pages one (this was in C, not PHP) and *that* was hard to untangl

Re: [PHP] 9970318527584

2011-02-18 Thread Robert Cummings
On 11-02-18 10:08 PM, John Taylor-Johnston wrote: 9970318527584 Could this number refer to a date()? In late 2009? How could I calculate it? Doesn't look like it... echo date( 'Y-m-d H:i:s', 9970318527584 )."\n"; Not even a JavaScript millisecond timestamp: echo date( 'Y-m-d H:i:s',

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 06:29 AM, Dotan Cohen wrote: I wrote a short page on how to actually type of code that one writes, it can be found here: http://dotancohen.com/howto/write_code.html The point that I stress on the page is that first you close an element, then you fill it's contents. The page has examp

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 08:58 AM, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 14:11, Jay Blanchard wrote: It is an interesting concept Dotan, what is the goal? Who is the page targeted to? The goal is to have every open and close bracket matched, and not have to worry about what is still open. This is

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Robert Cummings
On 11-02-22 09:06 AM, Dotan Cohen wrote: On Tue, Feb 22, 2011 at 14:58, Robert Cummings wrote: I'm more likely to do this stuff for HTML than PHP. However, I do sometimes lay out the structure of some conditionals/functions before fleshing them out so that I can do some early testing..

Re: [PHP] Manipulating variables

2011-02-23 Thread Robert Cummings
On 11-02-23 11:48 PM, Ron Piggott wrote: Is there a way to make this syntax: $checking_answer = $answer_reference_2; Equal to: $checking_answer = $answer_reference_ . ($i + 1); (where $i = 1) making $checking_answer take on the value of $answer_reference_2 ? I am trying to develop a web ap

Re: [PHP] echo?

2011-03-22 Thread Robert Cummings
On 11-03-22 06:22 PM, Jim Giner wrote: Kinda new to this, but I've been puttering/writing for about 3 weeks now and have some good working screens up. Ran into something new while I was debuggina script today. Tried to echo the $i value within a for loop as part of the list of items I was buil

Re: [PHP] Re: Looking for Tool to read JSON format

2011-04-02 Thread Robert Stone
Have you looked at http://pecl.php.net/package/json Might help. Package php-services-json is at version 1.0.2-1 on my Debian install. Bon soir, Robert --- Em sáb, 2/4/11, Michelle Konzack escreveu: De: Michelle Konzack Assunto: [PHP] Re: Looking for Tool to read JSON format Para: php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Robert Stone
Hi Jim, I think that you'll find that ' ' is treated as a NULL and as such will always return zero. You are no catering for multiple spaces in the column race_winner. If you were using Oracle, their INSTR function has an optional argument that allows you to search backwards from the end of a str

[PHP] Online tests for php

2011-04-13 Thread robert mena
Hi, I am trying to hire some php developers for a local taks and I need to somehow perform a triage. One of the aspects is the knowledge of PHP itself so I was wondering if there is any set of questions (multiple choice) to try to do that. I am not looking for a certification level in those test

Re: [PHP] Flattery will get you nowhere

2011-04-27 Thread Robert Cummings
On 11-04-27 04:47 PM, HallMarc Websites wrote: I just googled up "php tedd form validation" and can't find a single reference. What does this mean, that I respect tedd's skills or that he needs better SEO? OOH!! I KNOW! I KNOW! PICK ME! PICK ME! Um Both? No wait, maybe Tedd doesn't wan

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread Robert Cummings
On 11-04-28 05:23 PM, Nathan Rixham wrote: tedd wrote: At 4:58 PM -0400 4/27/11, Robert Cummings wrote: Tedd who? ;) Cheers, Rob. Rob what? ;-) Cheers, tedd flirting? Flirting will get you everywhere *bats eyelids* -- E-Mail Disclaimer: Information contained in this message and

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Robert Cummings
On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sen

Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Robert Cummings
On 11-04-29 08:04 AM, Steve Staples wrote: On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote: On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1

Re: [PHP] A Review Request

2011-05-18 Thread Robert Cummings
On 11-05-18 04:42 PM, Tim Streater wrote: On 18 May 2011 at 20:31, Joshua Kehn wrote: On May 18, 2011, at 3:22 PM, tedd wrote: What do you people think? I can say I really don't like your bracing style. I completely disagree - having the braces lined up is the only way to go. Means I

Re: [PHP] problem in onclick

2011-05-20 Thread Robert Cummings
It is completely wrong... JavaScript is client side technology (your browser), PHP is server side technology (your web server). To do what you want, you SHOULD just wrap the image in a link: If you MUST use JavaScript, then you can use onclick() to redirect: onclick="document.location( 'wher

Re: [PHP] A Review Request

2011-05-20 Thread Robert Cummings
On 11-05-20 09:14 AM, Joshua Kehn wrote: On May 20, 2011, at 4:41 AM, Tim Streater wrote: On 20 May 2011 at 04:03, Alex Nikitin wrote: but here is a brief example: (!DEBUG) || error_log("Fetch Data: ".memory_get_usage()/1048576); If you're going to use ugly little shortcuts why not simpli

Re: [PHP] Need experience with OOPHP

2011-05-20 Thread Robert Cummings
On 11-05-20 10:15 AM, Jasper Mulder wrote: Just the short week that I have been subscribed to this list, I have encountered numerous code examples using the new OOPHP. A bit of a culture shock, but since I also code in Java regularly, no conceptual difficulties occur. Only thing is now, that I

Re: [PHP] problem in onclick

2011-05-20 Thread Robert Cummings
On 11-05-20 02:30 PM, Andre Polykanine wrote: Hi Richard, Tedd, Hey guys, you did understand what I meant. I meant you can't just go and write a session variable by onclicking it in JavaScript. You need AJAX for that, don't you? You need a trip to the server whether it

Re: [PHP] problem in onclick

2011-05-20 Thread Robert Cummings
On 11-05-20 02:51 PM, HallMarc Websites wrote: And there are some hosting companies that offer servers that run JavaScript server side like Jaxer That is not an endorsement of any kind. I have yet to sign up for an account. I do know that the idea of running JavaScript server side has been kicked

Re: [PHP] problem in onclick

2011-05-20 Thread Robert Cummings
On 11-05-20 03:06 PM, Negin Nickparsa wrote: Robert could u plz exactly tell me how i can work with GET and write my SESSION i tried your code abt session but i didn't get it right but for another ones i tried and it was right Hi Negin, What part are you having a problem with? The first

Re: [PHP] problem in onclick

2011-05-20 Thread Robert Cummings
On 11-05-20 03:27 PM, Negin Nickparsa wrote: i want to click on the image then it stores the session so i can have many different tables in another one unique page suppose that i have A in my column when i click on image then it showed me the table of A in another page but if i click on the image

Re: [PHP] A Review Request

2011-05-21 Thread Robert Cummings
On 11-05-21 09:26 AM, tedd wrote: At 2:49 PM -0400 5/19/11, Joshua Kehn wrote: On May 19, 2011, at 2:44 PM, Andre Polykanine wrote: Hello Alex, Two (stupid?) questions: 1. Why PHP_SELF is better than SCRIPT_NAME? 2. Why strcmp() is better than just comparing? -- With best regards

Re: [PHP] PHP to Java integration using : shell_exec function

2011-05-26 Thread Robert Williams
pe it out of echo: $result = shell_exec("/bin/echo -n $xml_shell | /usr/bin/java/java -jar MyApp.jar -XML"); Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Authority http://www.thesba.com/ N

Re: [PHP] phpsadness

2011-05-27 Thread Robert Cummings
On 11-05-27 03:52 PM, Daevid Vincent wrote: A friend sent me this URL today. While amusing, he's got many valid points and I certainly share in his frustration. http://www.phpsadness.com What a whiner! Many of the things listed are things which give PHP character and history. Cheers, Rob. --

Re: [PHP] phpsadness

2011-05-27 Thread Robert Cummings
On 11-05-27 05:54 PM, Nathan Nobbe wrote: On Fri, May 27, 2011 at 3:52 PM, Robert Cummings mailto:rob...@interjinn.com>> wrote: On 11-05-27 03:52 PM, Daevid Vincent wrote: A friend sent me this URL today. While amusing, he's got many valid points and

Re: [PHP] phpsadness

2011-05-28 Thread Robert Cummings
On 11-05-28 05:26 AM, Andre Polykanine wrote: Hello Lester, Actually, many of the points are not important for me so far, however this one really drives me mad: http://phpsadness.com/?page=sad/35 (can't explode() by an empty string) Besides that, he says nothing about unicode issues. I

Re: [PHP] phpsadness

2011-05-29 Thread Robert Cummings
On 11-05-28 08:36 PM, TR Shaw wrote: Well the argument has both sides. Division by zero on many platforms resulted in zero. Then came IBM360 and it generated an exception causing big time issues in legacy code so a OS patch was written to intercept the interrupt, jam the result to zero and ret

Re: [PHP] iPhone sadness

2011-05-31 Thread Robert Cummings
On 11-05-31 07:15 AM, Jay Blanchard wrote: [snip] I can remember when it first started, no moaning about this or that, just pure PHP, and no sarcastic comments either, bring back the good old days :) [/snip] I beg to differ - the sarcastic remarks have been here since day one. Yeah *SHEEE

Re: [PHP] phpsadness

2011-05-31 Thread Robert Cummings
On 11-05-31 02:54 PM, Daniel Brown wrote: On Sun, May 29, 2011 at 14:56, Robert Cummings wrote: Personally, I prefer the exception. Logically, I can take 0 from something an infinite number of times... zero seems a far cry from this. To properly determine the intent of a division by zero, I

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 09:33 AM, Richard Riley wrote: Geoff Shang writes: On Sun, 5 Jun 2011, Tim Streater wrote: Anyone whose site says that sort of crap needs a good smack. Don't get me started on Facebook. If they don't like your browser, they redirect you to their"We don't support your browser p

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 01:23 PM, Richard Riley wrote: Geoff Shang writes: On Sun, 5 Jun 2011, Richard Riley wrote: I don't. I just don't want them to lock out my browser just because they don't support it. Many pages which don't work optimally under Lynx can still be read, which is all I'm wanting

Re: [PHP] phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 01:40 PM, Paul M Foster wrote: On Fri, Jun 03, 2011 at 01:52:15PM -0700, Daevid Vincent wrote: and I'm "balding" from Alopecia Me too, but in my case, it's just 'cause I'm old. ;-} My sympathies to you both... I'm baling because I produce a lot of testosterone >:D Although, e

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 02:25 PM, Richard Riley wrote: Ashley Sheridan writes: > I think his point is that a lot of websites ignorantly stop browsers not on their list of compatible ones, and end up blocking browsers that would work perfectly well, just the original developer either wasn't aware or didn't

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 07:28 PM, tedd wrote: At 2:15 PM -0400 6/5/11, Robert Cummings wrote: 2 words... progressive enhancement. If your browser doesn't support a feature then it should degrade gracefully. Accessible web philosophy 101. I hate going on to some website, especially government, and fi

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-05 Thread Robert Cummings
On 11-06-05 07:28 PM, Richard Quadling wrote: On 5 June 2011 19:15, Robert Cummings wrote: 2 words... progressive enhancement. If your browser doesn't support a feature then it should degrade gracefully. Accessible web philosophy 101. I hate going on to some website, especially government

Re: [PHP] Re: phpsadness - P.C. shmee seee.

2011-06-06 Thread Robert Cummings
On 11-06-06 05:18 AM, Richard Quadling wrote: On 6 June 2011 01:44, Robert Cummings wrote: On 11-06-05 07:28 PM, Richard Quadling wrote: There is another approach. Regressive Enhancement. Essentially, create your site with all the bells and whistles enabled. Make full use of all / any

Re: [PHP] Create a hierarchical hash from flat source

2011-06-23 Thread Robert Cummings
On 11-06-23 12:54 PM, Tamara Temple wrote: On Jun 22, 2011, at 5:24 PM, Scott Baker wrote: On 06/22/2011 03:17 PM, Simon J Welsh wrote: You still need to pass the value by reference to assign_children(), so: $new =&$leaf[$pid]; assign_children($pid,$list,&$new); One last thing I fixed was t

Re: [PHP] Upgrade or Die?

2011-06-24 Thread Robert Cummings
On 11-06-24 01:16 PM, ad...@buskirkgraphics.com wrote: In shifting gears to a faster pace of development and release, Mozilla has opted to abandon security support for Firefox 4 immediately upon the release of version 5, which came out this week. This could be a risky move, since many users negl

Re: [PHP] vend-bot?

2011-07-04 Thread Robert Cummings
On 11-07-03 04:17 PM, Kirk Bailey wrote: ok, here's the deal; we sent someone to the paypal site for their purchase; the site will use the palpal shopping cart. When they come back, there needs to be a way to identify the product and the transaction so they an get the product ONCE. Now for a sing

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 09:40 AM, Dajka Tamas wrote: Hi all, I've bumped into an interesting thing with foreach. I really don't know, if this is normal working, or why it is, so I got curious. The script: foreach ( $cats as&$c ) { echo $c['id']; if ( $c['id']< 5 )

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 10:20 AM, Dajka Tamás wrote: Hi, Yeah, I'm really want to do that, since I'm working with the elements of the original array ( skipped that part in sample code ). I've tried your suggestion, but it gives the same result, so on just one input is just gives back '1'. Ahhh... you w

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 10:39 AM, Dajka Tamás wrote: Ok, but if it would be that way I shouldn't get '122334455' for second output, no? The item count increments with every iteration of the loop. Or you're saying that, it checks for an existance of nextitem before every loop, and that will fail with jus

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 10:39 AM, Dajka Tamás wrote: Ok, but if it would be that way I shouldn't get '122334455' for second output, no? The item count increments with every iteration of the loop. Or you're saying that, it checks for an existance of nextitem before every loop, and that will fail with just

Re: [PHP] Re: Top Posting

2011-07-05 Thread Robert Cummings
On 11-07-05 10:42 AM, Jim Giner wrote: outlook doesn't offer an option for that. I'm pretty sure it has a scrollbar on the side ;) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 09:40 AM, Dajka Tamas wrote: foreach ( $cats as&$c ) { echo $c['id']; if ( $c['id']< 5 ) { $c['id']++; $cats[] = $c; } } Given that you seem to want the above functi

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 10:48 AM, Dajka Tamás wrote: Thanks, that was interesting :) I think I got one step further in understanding PHP :) BTW, I've changed the loop to 'for' and it's working well :) Can you show us your for loop? I'm not immediately sure how you use a for loop to traverse a growing nu

Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings
On 11-07-05 11:46 AM, Louis Huppenbauer wrote: Just use count($arr) in your for-header, as it get's executed again for each loop. 1), array('id'=>2)); for($i=0;$i $arr[$i]['id']+1); } } ?> Ok, so the extents are being updated on each pass of the loop :) Ch

Re: [PHP] Constants in strings

2011-07-06 Thread Robert Williams
e constant, I do it for all related constants even if not needed, just for the sake of consistency. This means that I frequently end up using variables where constants would work just fine. With the prefix convention and a disciplined team, this proves easily tenable, but it's not ideal. -Bob

Re: [PHP] Constants in strings

2011-07-06 Thread Robert Cummings
On 11-07-06 02:59 PM, Jim Giner wrote: I LOVE the heredocs tool. I only learned about it a couple of months ago - what a find! It makes generating my html for my web pages so much easier and allows me to include my php vars within the html with much less confusion and simplifies the intermi

Re: [PHP] Your language sucks because...

2011-07-15 Thread Robert Cummings
On 11-07-15 04:21 PM, Daniel Brown wrote: On Fri, Jul 15, 2011 at 16:04, Ashley Sheridan wrote: I'm still not getting it, and the only dictionary I have about is some tiny pocket one I've had since I was 9! The word was 'tmesis', which is a linguistic phenomenon in which words or phra

[PHP] Understanding deprecated features from 5.2 -> 5.3

2011-07-31 Thread robert mena
Hi, I am planning to upgrade my server from 5.2 to 5.3 but I am not sure if the deprecated features will simply throw warning messages but work or won't work at all. So far I've read that deprecated features are going to be removed on later versions. Unfortunately I host sites and some may use f

[PHP] Problems with interoperability: MCrypt AES PHP x Java

2011-08-09 Thread robert mena
Hi, I am having problems while trying to decrypt an encrypted string (generated from a java system) in PHP. To take external factors out of the way I decided to make them work first in my local system. So I've created a sample encrypt/decrypt from PHP (using mcrypt's extension) and the java code

[PHP] Anyone has mcrypt working with Zend Community Edition and Mac OS X Lion?

2011-08-19 Thread robert mena
Hi, After I've upgraded it stopped working and even if I reinstall the Zend CE package it complains. Regards.

Re: [PHP] Code should be selv-maintaining!

2011-08-29 Thread Robert Cummings
On 11-08-29 03:42 PM, Rico Secada wrote: You go into your homemade library of code to re-use some piece that you already are using 12 other places in production. Now, last time you worked on the code you thought it was almost perfect. While working on the code this time you find an undiscovered b

Re: [PHP] Re: Code should be selv-maintaining!

2011-08-29 Thread Robert Cummings
On 11-08-29 04:05 PM, Richard Riley wrote: Robert Cummings writes: On 11-08-29 03:42 PM, Rico Secada wrote: You go into your homemade library of code to re-use some piece that you already are using 12 other places in production. Now, last time you worked on the code you thought it was almost

Re: [PHP] Code should be selv-maintaining!

2011-08-30 Thread Robert Cummings
On 11-08-30 11:36 AM, Richard Quadling wrote: On 30 August 2011 15:04, Tedd Sperling wrote: To all: I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But "style" is really up to the individual -- what works best for you is the "best" (unless it's a team ef

[PHP] Mysqli error handling

2011-08-31 Thread Robert Williams
this relates to the underlying implementation, but it's still quite the letdown. Is there something I'm missing in all this, or is really as clunky as it seems? What have those of you with more Mysqli experience found to work well as a good error-handling pattern when working with it? -- Rob

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Robert Cummings
On 11-08-31 08:20 PM, Tedd Sperling wrote: On Aug 30, 2011, at 3:09 PM, Robert Cummings wrote: On 11-08-30 11:36 AM, Richard Quadling wrote: On 30 August 2011 15:04, Tedd Sperling wrote: To all: I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Robert Cummings
On 11-09-01 01:44 AM, Ross McKay wrote: On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote: I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But "style" is really up to the individual -- what works best for you is the "best" (unless it's a team effort

Re: [PHP] Code should be selv-maintaining!

2011-09-01 Thread Robert Cummings
On 11-09-01 02:39 AM, Ross McKay wrote: Robert Cummings wrote: That's because JavaScript is broken in some ways. As much as I like JavaScript, some parts of the language were thrown together by flinging crap at a fan and seeing what sticks to the wall... this being a prime example. Sou

Re: [PHP] Re: Repetitive answers . . .

2011-09-09 Thread Robert Cummings
On 11-09-09 02:19 PM, Joshua Stoutenburg wrote: Is there a way to reconfigure gmail settings to prevent this? Yes, just filter all PHP mail to junk. But in all reality, I can't imagine an email filter, short of genius AI, that could determine that one message was the best answer and then auto

Re: [PHP] Re: Repetitive answers . . .

2011-09-09 Thread Robert Cummings
On 11-09-09 02:24 PM, George Langley wrote: On 2011-09-09, at 11:34 AM, Marc Guay wrote: That low-hanging fruit is too hard for some to resist... --- Phishing is a art. Did anyone notice it's Friday? Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI Cheers, Rob. -- E-Mail D

Re: [PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Robert Cummings
On 11-09-13 03:56 PM, Brad Huskins wrote: Hello all you php coders out there, I'm doing an Open Source text editor (just a hobby) that's designed for PHP developers and is accessible through the web. This has been stewing for a while, and has gotten to the point where I can use it for my own wor

Re: [PHP] lost return value during a static call

2011-09-15 Thread Robert Williams
On Sep 15, 2011, at 6:03, "chamila gayan" wrote: > when it goes through 2 static methods, at some point it stops returning > value to the calling method. (please see comments in-line). The getArray() method and the 'else' portion of the getChild() method both lack a return statement, so they'r

Re: [PHP] Re: Repetitive answers . . .

2011-09-16 Thread Robert Cummings
On 11-09-15 09:31 PM, Joshua Stoutenburg wrote: class baboon { $ammo = ''; public __construct($ammo) { $this->ammo = $ammo; } public function flingAt($target) { $target->flingAlert($this->ammo); } } $me = new baboon($information); $you = ne

Re: [PHP] Help on number matching function

2011-09-16 Thread Robert Williams
On Sep 16, 2011, at 6:02, "Dare Williams" wrote: > > I have a 5 Digits set of number and need to match it with another set of > five digits and return how many number are match and the figures that are > match. Check out array_intersect().

Re: [PHP] Episode 2 - All The Cool Kids Use Ruby

2011-09-16 Thread Robert Cummings
On 11-09-16 02:30 PM, Daevid Vincent wrote: http://www.youtube.com/watch?v=5GpOfwbFRcs LOLercopter That's just fantastic! Have a great weekend. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected

Re: [PHP] Bug?

2011-09-18 Thread Robert Stone
mpara strings, garante que elas não sofram cast para outro tipo de dado. Você pode atingir isso usando "===" também, sem essa função de comparação de strings. Here you compare strings, and guarantee that they don't suffer casting to another data type. You can achieve the same thing by using the "===" operator also, without (using) this string comparison function. Hope this helps. Cheers, Robert

Re: [PHP] How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Robert Williams
x27;Pass!'; } else { echo 'Fail!'; } //if-else } //for i The key thing to note there is that you can treat the string like it's an array to loop through it. For more information about this, go here: <http://us2.php.net/manual/en/language.types.string.php>

Re: [PHP] How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Robert Williams
which is then returned. This has the net effect of 1) quietly changing your variable's value, and 2) making the overall expression always evaluate to true, sending you into the the true part of the conditional branch, well, unconditionally. -- Robert E. Williams, Jr. Associate Vice Presiden

Re: [PHP] Variable question

2011-10-01 Thread Robert Cummings
On 11-10-01 02:03 PM, Mike Mackintosh wrote: On Oct 1, 2011, at 1:59 PM, Ron Piggott wrote: If $correct_answer has a value of 3 what is the correct syntax needed to use echo to display the value of $trivia_answer_3? I know this is incorrect, but along the lines of what I am wanting to do:

Re: [PHP] Variable variable using constant

2011-10-12 Thread Robert Williams
uot;;); > >and I would like to populate the value of an href with them depending >on the user's language. $_SESSION['lang'] is either 'en' or 'fr'. >How would I go about referring to this variable? Try: $var = constant('DESKTOP_URL_' . $

Re: [PHP] FW: parse error

2011-10-13 Thread Robert Williams
t that something is wrong. Try double-checking that the {Š} blocks prior to line 1050 properly balance, and you'll probably find there's an extra one, or that one is missing, etc. If nothing else, just start stripping code from the file until you find the line that's actually at fault.

Re: [PHP] What is wrong with this preg_match?

2011-10-27 Thread Robert Williams
matching string to the beginning of the string, while the $ anchors it to the end, which effectively forces the expression to match the entire string, disallowing extra characters before or after it. Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Busi

[PHP] Dependency Injection containers

2011-10-31 Thread robert mena
Hi, I am trying to avoid reinventing the wheel so I am looking for dependency injection containers that work with PHP 5.2. So Symphony2 and ZF2 DI are out of question. I found this http://www.potstuck.com/2010/09/09/php-dependency-a-php-dependency-injection-framework/ but I was wondering if an

<    18   19   20   21   22   23   24   25   26   27   >