Re: [PHP] PHPDoc way to describe the magic getter/setters [SOLVED]

2013-09-25 Thread David Harkness
providing magic getters and setters, why not use __get and __set instead of __call with matching on "get_xxx" and "set_xxx"? This would allow using the simpler (and IMHO much more expressive and PHP-ish) forms $obj->foo = $obj->bar + 5; Peace, David

Re: [PHP] PHP Dependency Injector

2013-09-05 Thread David Harkness
On Thu, Sep 5, 2013 at 1:40 PM, Juan Sebastian Scatularo < sebastianscatul...@gmail.com> wrote: > Thanks Sorin, I will do that and I will have more care the next time. You can also check out Pimple [1] by the creator of the Symfony Framework. Peace, David [1] http://pimple.sensiolabs.org/

Re: [PHP] Static utility class?

2013-09-04 Thread David Harkness
. If you post some examples of methods you want to make static, we can give you pointers on which are good candidates and which are best left to instance methods. Peace, David

Re: [PHP] Re: Permissions

2013-08-27 Thread David Robley
Ashley Sheridan wrote: > On Tue, 2013-08-27 at 16:16 +0930, David Robley wrote: > >> Ethan Rosenberg wrote: >> >> > Dear List - >> > >> > Tried to run the program, that we have been discussing, and received a >> > 403 error. &g

[PHP] Re: Permissions

2013-08-26 Thread David Robley
gt; > Ethan This is in no way a php question, as the same result will happen no matter what you ask apache to serve from that directory. You have the directory permissions set to 776 not 777. -- Cheers David Robley Steal this tagline and I'll tie-dye your cat! -- PHP General Mailing L

Re: [PHP] exec and system do not work

2013-08-26 Thread David Robley
"Ethan Rosenberg, PhD" wrote: > > > Ethan Rosenberg, PhD > /Pres/CEO/ > *Hygeia Biomedical Research, Inc* > 2 Cameo Ridge Road > Monsey, NY 10952 > T: 845 352-3908 > F: 845 352-7566 > erosenb...@hygeiabiomedical.com > > On 08/26/2013 07:33 PM

Re: [PHP] exec and system do not work

2013-08-26 Thread David Robley
cannot access /var/www/orders.txt: No such file or directory > > The ls -la works because the file was created from the command line. > > TIA > > Ethan Note that touch and chmod don't return any output, so echoing the result of a system call for those commands will give an empty string. You should be checking the values of $ret for each execution of system to see whether the command was successful or not - the return status of the executed command will be written to this variable. I'd guess that touch is returning 13 - permission denied. if( !file_exists("/var/www/orders.txt")) { system("touch /var/www/orders.txt", $ret1); echo 'touch returned '.$ret1.' /'; system("chmod 766 /var/www/orders.txt", $ret2); echo 'chmod returned ' .$ret2.' /'; echo 'file2'; echo file_exists("/var/www/orders.txt"); } Check the permissions for directory /var/www; you'll probably find it is writable by the user you log on as, but not by the user that apache/php runs as, which is often www - a user with limited privileges. As other(s) have pointed out, there are php functions to do what you want without introducing the possible insecurities involved with system et al. -- Cheers David Robley "Don't try to pull the wool over my eyes," Tom said sheepishly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP vs JAVA

2013-08-22 Thread David Harkness
lValue()" which is a method from Hamcrest. :( After a couple weeks of this, I think I'll be switching it back to manual activation. I can type quickly enough that I only need it when I'm not sure of a method name. NetBeans, while not as good with refactoring and plugin support, is still zippier than Eclipse. And my short time with the JetBrains products found them to be fast as well. Eclipse's PHP support via PDT is not nearly as good as NetBeans, and no doubt PHPStorm beats them both. Peace, David

Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread David Harkness
I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm now) and Eclipse for Java. You can't beat Eclipse's refactoring support in a free tool, though I think NetBeans is close to catching up. I would bet IntelliJ IDEA for Java by JetBrains is on par at least. Peace, David

Re: [PHP] PHP vs JAVA

2013-08-20 Thread David OBrien
On Tue, Aug 20, 2013 at 10:56 AM, David OBrien wrote: > > > > On Tue, Aug 20, 2013 at 10:43 AM, Tedd Sperling wrote: > >> On Aug 20, 2013, at 10:36 AM, "Liam" wrote: >> > You do realise you are on a PHP based user subscription, so the vast >> >

Re: [PHP] PHP vs JAVA

2013-08-20 Thread David OBrien
On Tue, Aug 20, 2013 at 10:43 AM, Tedd Sperling wrote: > On Aug 20, 2013, at 10:36 AM, "Liam" wrote: > > You do realise you are on a PHP based user subscription, so the vast > > majority will go with PHP, so you will get a one sided argument. > > > > Regards, > > Liam > > > I realize that many,

[PHP] Re: How to upstream code changes to php community

2013-08-12 Thread David Robley
the Community menu item on the PHP home page. -- Cheers David Robley Enter any 11-digit prime number to continue... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP5 OOP: Abstract classes, multiple inheritance and constructors

2013-06-21 Thread David Harkness
There's no way to bypass an overridden method using "parent", but you could add an abstract method that Child would implement. class Parent function __construct() { $this->foo = $this->getFoo(); } abstract function getFoo(); } David

Re: [PHP] What is the name of the pattern that will ...

2013-06-13 Thread David Harkness
protected abstract function MakeAuthRequestImpl(); } Peace, David

Re: [PHP] Binding object instances to static closures

2013-05-31 Thread David Harkness
stMethod(function($param){ > var_dump($this === $param); > }); > I get why closures created inside static methods cannot be bound to an instance . . . but those created *outside* an object method entirely *can* be bound? That makes no sense! And yet it works. David

Re: [PHP] Binding object instances to static closures

2013-05-31 Thread David Harkness
rn function() use ($self, $testInstance) { return $self === $testInstance; } } } TestClass::testMethod(); Peace, David

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-30 Thread David Harkness
expressions cannot handle a context-free grammar. And finally I leave you with Jeff Atwood's article about (not) parsing HTML with regex. [3] Peace, David [1] http://dinosaur.compilertools.net/ [2] http://stackoverflow.com/questions/3487089/are-regular-expressions-used-to-build-parsers [3

[PHP] Re: Include/Require limit?

2013-05-30 Thread David Robley
files I easily get over 100 KB inclusion size, so my > question; > Is there a size limitation for include? > > Best regards Do you get an error message? Try removing the header() in the image output and see what happens. -- Cheers David Robley PARANOID:Paying MORE for Surge-Protect

Re: [PHP] need some regex help to strip out // comments but not http:// urls

2013-05-28 Thread David Harkness
SS file each. For your situation, I don't know a regular expression that will work in all cases. David

Re: [PHP] need some regex help to strip out // comments but not http:// urls

2013-05-28 Thread David Harkness
solution and is probably tested by a lot more people than a home-grown version. You might want to check it out before going too far down this path. Good luck, David [1] http://www.ypass.net/software/php_jsmin/

[PHP] Re: Doing something wrong?

2013-05-21 Thread David Robley
gt; It's working on the other machines and loading all the extra modules > happily. > Did you "make clean" after reconfiguring before re-compiling php? According to https://bugs.php.net/bug.php?id=63611 that may be a cause. -- Cheers David Robley An ulcer is what you get mountain

Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread David OBrien
On May 20, 2013 8:45 PM, "Matijn Woudt" wrote: > > > On Mon, May 20, 2013 at 10:46 PM, David OBrien wrote: >> >> On Mon, May 20, 2013 at 4:14 PM, Tim Schofield wrote: >> >> > Matijn >> > >> > There are well over half a million

Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread David OBrien
On Mon, May 20, 2013 at 4:14 PM, Tim Schofield wrote: > Matijn > > There are well over half a million lines of source code in PHP. It seems a > little unhelpful to tell someone to go and read half a million lines of C > when you could just tell them the answer? > > Thanks > Tim > > Course View To

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread David Harkness
; empty($this->destinationTime)) { throw new IllegalStateException('Must set desired time travel destination'); } $this->adjustThrottle($mph - $this->speed); } } You could make Engine an abstract class, but that would reduce your users' choice. David

Re: [PHP]

2013-05-08 Thread David OBrien
On Wed, May 8, 2013 at 1:22 PM, Daniel Brown wrote: > On Wed, May 8, 2013 at 1:14 PM, Tedd Sperling > wrote: > > > > PS: PHP + > "Produced by Horses & Ponies." ? You got too much time on > your hands Daniel. > > And yes, I just made up the word acronymize. > That would be reverse acronymization

Re: [PHP] ODBC

2013-05-06 Thread David OBrien
On Mon, May 6, 2013 at 3:32 PM, georg wrote: > Hi, > > Id like to get ODBC connection to SQL from PHP going. Ive done that on XP, > but now Im switching > to Linux (Fedora). > > My impression in that the connecting part is per the DB designers > responsibility. Im using Mimer-SQL, > but cant find

Re: [PHP] Updated PHP breaks processing-intense Procedure

2013-04-24 Thread David OBrien
On Wed, Apr 24, 2013 at 5:14 PM, David OBrien wrote: > On Wed, Apr 24, 2013 at 5:09 PM, Ken Kixmoeller wrote: > >> Hey - -- >> >> I have a huge screen -- to make it simple for the user, it does 100s of >> calls to MySQL and has 1,000s (literally) of POST variables

Re: [PHP] Updated PHP breaks processing-intense Procedure

2013-04-24 Thread David OBrien
On Wed, Apr 24, 2013 at 5:09 PM, Ken Kixmoeller wrote: > Hey - -- > > I have a huge screen -- to make it simple for the user, it does 100s of > calls to MySQL and has 1,000s (literally) of POST variables. > > We have done extensive research and see that upgrading from php 5.1.6-27 to > 5.1.6-39 i

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread David Robley
ysql --host=instance43490.db.xeround.com --port=8904 > --user= --password= > > WORKS perfectly - entering the MySQL Monitor. > > However, on the same host, same command line: > > sudo mysql --host=instance43490.db.xeround.com:8904 --user= > --password= > > Does NOT work -

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
In fact using the @gmail.com part added on gives me the same error as the OP I think their welcome email needs tweaking.. try it without the domain added on On Sun, Apr 21, 2013 at 6:56 PM, David OBrien wrote: > > I should note my user name in this case *is* an email address, however

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
> I should note my user name in this case *is* an email address, however the dots in that address are *not* being converted to underscores as mentioned (at least not visibly). I just created a free account there and the email says my username is dgobr...@gmail.com but I connected to it from sqlyo

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
On Sun, Apr 21, 2013 at 6:01 PM, Glob Design Info wrote: > One other thing I noted in the FAQ was this: > > "Dots in incoming variable names > Typically, PHP does not alter the names of variables when they are passed > into a script. However, it should be noted that the dot (period, full stop) > i

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
Not meaning to beat the proverbial dead horse I am developing a web portal that has to display the tables in the DB via a > form/script. The web page has a login with user and password. Right now I > am just trying to connect. > This for a commercial app - the client wants both an API connect via

Re: [PHP] mysql_connect noob question

2013-04-20 Thread David OBrien
> > > $form_user = $_POST[ 'user' ]; > > $form_pass = $_POST[ 'password' ]; > > > > # Connect to remote DB > > > > $LINK = mysql_connect( $host, $form_user, $form_pass ); > > > > And yes, my $host param is correct. > Have you tried $LINK = mysql_connect( $host, "$form_user", "$form_pass" ); just

Re: [PHP] mysql_connect noob question

2013-04-19 Thread David Robley
t; And yes, my $host param is correct. >>> >>> Thanks, >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> First guess is that you don't have privil

Re: [PHP] Need a tool to minimize HTML before storing in memecache

2013-04-17 Thread David OBrien
On Wed, Apr 17, 2013 at 5:52 PM, Daevid Vincent wrote: > We do a lot with caching and storing in memecached as well as local copies > so as to not hit the cache pool over the network and we have found some > great tools to minimize our javascript and our css, and now we'd like to > compress our H

Re: [PHP] Re: Is BBCode Installed

2013-04-11 Thread David Harkness
Hi Stephen, I just tried installing the PECL extension, but it failed to build on PHP 5.4.6-1ubuntu1.2. I see Xdebug in the phpinfo output, and I assume other PECL extensions will show up there once installed. Good luck! David

Re: [PHP] Re: Is BBCode Installed

2013-04-10 Thread David Robley
Stephen wrote: > On 13-04-10 10:59 PM, David Robley wrote: >> I ran phpinfo() on my host and searched for "BBCode". Not found. >> >> Does this mean that the extension is not installed? >> >> If not, how can I tell? >> >> Thanks >> >

[PHP] Re: Is BBCode Installed

2013-04-10 Thread David Robley
r languages. See http://www.bbcode.org/ for more info. -- Cheers David Robley Some people are afraid of heights. I'm afraid of widths -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there a PHP based authentication library?

2013-04-01 Thread David OBrien
On Mon, Apr 1, 2013 at 5:26 PM, Mark wrote: > Hi, > > I stumbled upon this payment library: http://ci-merchant.org/ which > abstracts the different payment backends away and exposes a new easy > to use interface for the app developer to use. Thus making it very > easy to use different payment pro

Re: [PHP] application level variable file

2013-03-22 Thread David OBrien
On Fri, Mar 22, 2013 at 10:26 AM, Stuart Dallas wrote: > On 22 Mar 2013, at 14:22, wrote: > > > I am very new to the PHP application and would like to create a new > project. > > I would like to have a file to save my application level variable and > > functions. > > > > I would like to know doe

Re: [PHP] actually HTML again; resizeing images

2013-03-17 Thread David OBrien
On Mar 17, 2013 12:28 PM, "Stuart Dallas" wrote: > > On 17 Mar 2013, at 13:22, "georg" wrote: > > > Anyone knows a good reading about how and when images displayd with HTML tags are > > re-sized ? > > Not entirely sure what you mean, but a downloaded image will be resized when it needs to be show

[PHP] php gd extension with cPanel

2013-03-14 Thread David Mehler
Hello, I'm hoping there's an easy fix for this. I've got a centos server machine 6.4 I believe with cPanel running on it. I need to enable the gd extension, both the gd and gd-devel rpm packages are installed, but php is not, that is showing up in a package list. It is however installed as it's go

Re: [PHP] Mystery foreach error

2013-03-13 Thread David Harkness
tter for Angela since she isn't storing null in the array, though. Peace, David

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-13 Thread David Robley
gt; the largest of all non-commercial genealogical projects. > readfile() is probably where you want to start, in conjunction with a captcha or similar -- Cheers David Robley Catholic (n.) A cat with a drinking problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mystery foreach error

2013-03-13 Thread David Harkness
into the array, I prefer the isset() form because the syntax reads better to me. Peace, David

Re: [PHP] Mystery foreach error

2013-03-12 Thread David Robley
{ > echo 'no'; > } > } > ?> > > Running this script, I got the same error as before. If $state is a known > state abbreviation in the array, everything is fine, but if someone was to > enter, say 'XX' like I did above or leave it blan

Re: [PHP] Does Scope-Resolution Operator Always Follow 'parent'?

2013-03-11 Thread David Harkness
return new parent; } } I think you'll be safe if you can highlight it only when preceded by "new" or followed by "::". David

Re: [PHP] Not counting my own page visits

2013-03-04 Thread David Robley
but the cookie is not. There's no cookie in > the browser prefs, either. What am I doing wrong? > > Angela Misunderstanding what $cookie contains? It is a boolean, i.e. it will be true or false depending on whether the cookie was set or not. To echo the contents of a cookie, you need to use the cookie name, viz "; ?> -- Cheers David Robley Oxymoron: Sisterly Love. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread David Robley
Alarms >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > Do test this, but I think all that's required is you make the name an > array: > > More info at http://www.php.net/manual/en/language.variables.external.php (search for multiple) and http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple -- Cheers David Robley Know what I hate? I hate rhetorical questions! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-15 Thread David Robley
['username'] = 'root'; > $config['Database']['password'] = 'root'; > $config['Database']['charset'] = 'utf8'; > ?> Change host to localhost - your mysql may be configured not to accept requests via tcp. > > === class.lpdo.php > > > -- > Thanks, > Dave - DealTek > deal...@gmail.com > [db-3] -- Cheers David Robley My karma ran over my dogma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Late static binding behaves differently in PHP 5.3 and PHP 5.4

2013-01-24 Thread David Harkness
ss is that 5.4 introduced a bug that causes Bar to push its constant up into Foo. The strange thing is that the constant is compiled into the class, and since Bar extends Foo I would expect Foo to be compiled first regardless of the order in which you access the static variable later. David

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread David OBrien
On Thu, Jan 3, 2013 at 11:49 AM, Marc Guay wrote: > Hi John, > > I just ran this: > > if (($a = "foo") || ($b = "bar")){ > echo $a."".$b; > } > > and it only spat out "foo" so I'm guessing things have changed. :) > > Marc > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscri

Re: [PHP] Noobie starting to learn OOP for databases needs help

2012-12-16 Thread David OBrien
On Sun, Dec 16, 2012 at 2:08 PM, Matijn Woudt wrote: > On Sun, Dec 16, 2012 at 4:38 PM, dealTek wrote: > > > Hi all, > > > > Noobie starting to learn oop for databases from here: > > > > > > > https://github.com/JeffreyWay/PHP-MySQL-Database-Class/blob/master/MysqlDb.php > > > > I've got lots wo

Re: [PHP] Session ?

2012-12-08 Thread David OBrien
On Sat, Dec 8, 2012 at 12:10 PM, Jim Giner wrote: > On 12/8/2012 11:41 AM, Jim Giner wrote: > >> On 12/8/2012 11:04 AM, Daniel Brown wrote: >> >>> You can pass the session ID and reactivate the session that way, >>> sure. Not pretty, and it does lead to security considerations, but it >>> wo

[PHP] Re: PDO mysql Connection issue

2012-11-28 Thread David Robley
.mydomain.com This request is made to the mysql server on host server2.mydomain.com which responds with the error that access is denied for the user named 'user' on host server1.mydomain.com The most likely problem is that on server2.mydomain.com you do not have mysql privileges for

Re: [PHP] cron job problem

2012-10-23 Thread David OBrien
On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown wrote: > On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan > wrote: > > > > > > Crontab is the daemon which runs cron jobs, and some distros have set up > > special files called cron.daily (or daily.cron I don't recall), > > cron.hourly, etc to make i

Re: RES: [PHP] foreach

2012-10-16 Thread David McGlone
demands, every ">=" > matters, otherwise, better to stick with readability and separation of > concerns. > > Cheers, > Samuel. > > -Mensagem original- > De: Steven Staples [mailto:sstap...@mnsi.net] > Enviada em: terça-feira, 16 de outubro de 2012

Re: [PHP] foreach

2012-10-16 Thread David McGlone
lt;= $price){ > > > > echo "Not bad. I'll buy it."; > > > > } else > > > > echo "Too expensive I'm going home LOL "; > > > > } > > > > It's a dumb script that makes no sens

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread David OBrien
On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford wrote: > The value of date.timezone in php.ini is set to "America/Los_Angeles". > > The local time is 11:02 a.m. Yet the output of date("h:i a e") is: > > 02:02 pm America/Los_Angeles > > which is three hours ahead of the real time. > > Why is t

Re: [PHP] foreach

2012-10-15 Thread David McGlone
On Monday, October 15, 2012 08:21:23 PM you wrote: > Bastien Koert > > On 2012-10-15, at 8:16 PM, David McGlone wrote: > > I've been sitting here playing around with foreach() and I'm wondering why > > I am getting these results. here's what I've been

[PHP] foreach

2012-10-15 Thread David McGlone
ut I get is 1 1 Milk Milk 2.59 2.59 Which is printed to the screen according to how many rows are in the db I belive. So my question is why this behavior? I was expecting something like a while loop. -- David M.

Re: [PHP] appreciation

2012-10-12 Thread David McGlone
On Thursday, October 11, 2012 11:10:46 PM tamouse mailing lists wrote: > On Thu, Oct 11, 2012 at 8:02 PM, David McGlone wrote: > > Dear everybody :-) > > > > I wanted to thank everyone for helping me out on the stuff that I had been > > trying to do in the last

[PHP] appreciation

2012-10-11 Thread David McGlone
addir($handle)) !== FALSE){ if ($file != "." && $file != ".."){ echo ""; } } closedir($handle); } } function myglob(){ $result = mysql_query("SELECT * FROM properties"); while($row = mysql_fetch_array($result)){ $MLS_No = $row['MLS_No']; } $images = glob('images/property_pics/' .$MLS_No.'/*'); foreach ($images as $image){ echo ""; } } -- David M.

Re: [PHP] Re: limiting

2012-10-10 Thread David McGlone
On Wednesday, October 10, 2012 07:36:00 PM Tim Streater wrote: > On 10 Oct 2012 at 19:17, David McGlone wrote: > > > >> > >> > >> BTW - in any of your other computer languages didn't they utilize a > >> 'return' statement? PHP

Fwd: Re: [PHP] Re: limiting

2012-10-10 Thread David McGlone
-- Forwarded Message -- Subject: Re: [PHP] Re: limiting Date: Wednesday, October 10, 2012, 02:03:57 PM From: David McGlone To: jim.gi...@albanyhandball.com On Wednesday, October 10, 2012 01:31:58 PM Jim Giner wrote: > On 10/10/2012 1:19 PM, David McGlone wrote: > >

Re: [PHP] Re: limiting

2012-10-10 Thread David McGlone
ng me to not know the slightest thing about PHP and being someone I'm not! In my very original post on this series, I was using opendir and someone had suggested using glob. Well I didn't know much about glob, because of course I hadn't got that far yet, but since someone else had backed up the suggestion from the original poster I was dumb enough to jump forward to the unknown and cause myself to get confused and flustered and my train of thought blew right out the window! But, I'm the kind of person that doesn't give up! I was determined to figure out how to get glob to work for what I was trying to do because it was suggested by people who KNOW what they are doing and I KNOW they know what they are doing! I kept telling myself "glob is the answer", so really there's no reason to be SMUG about it! I should have went back to using opendir, but if I did that, someone would be on my ass about that sooner or later, harping at me that they showed me how to use glob! To top it off, I started dabbling and trying to learn PHP, back somewhere around early 2000 or 2001 and by that time I had my 2nd child on the way, but by 2002 I had had 3 kids born in '99, 2000 and 2002. So I had to put what I wanted to do on hold until here about a year ago, some things have changed since then in the PHP world and I'm pushing 45 years old and my brain isn't as sharp as it was 20 years ago! So, yes I got confused, and I didn't know much about return because I hadn't used it yet but that doesn't give anyone the right to judge me on that basis! With that said, I just may leave the list. After all if this is all I'm going to get out of it, it's not worth it! -- David M.

Re: [PHP] Re: limiting

2012-10-09 Thread David McGlone
On Tuesday, October 09, 2012 12:18:06 PM Jim Giner wrote: > On 10/8/2012 11:11 PM, David McGlone wrote: > > Hi all, > > > > is there any other way to limit this code to only displaying 1 image other > > than using return. When I use return, I can't get the other i

[PHP] limiting

2012-10-08 Thread David McGlone
gs like where(), str_repeat, basename, scandir, sort etc with no luck. :-/ -- David M.

Re: [PHP] Re: building upon the code RE: Differences

2012-10-05 Thread David McGlone
On Thursday, October 04, 2012 11:37:06 PM Bastien Koert wrote: > On Thu, Oct 4, 2012 at 10:41 PM, Jim Giner wrote: > > On 10/4/2012 10:15 PM, David McGlone wrote: > >> I hope I'm not being a pest. > >> > >> I've played with the return and ech

Re: [PHP] Re: building upon the code RE: Differences

2012-10-05 Thread David McGlone
On Thursday, October 04, 2012 10:41:17 PM Jim Giner wrote: > On 10/4/2012 10:15 PM, David McGlone wrote: > > I hope I'm not being a pest. > > > > I've played with the return and echo so much today I've finally realized > > I'm going in circle

[PHP] building upon the code RE: Differences

2012-10-04 Thread David McGlone
do now is instead of having ALL the images display, I want to try and group them by their name. If I were using SQL I'd simply use a where clause and be done with it, but I'm not sure what would acomplish the same thing or similiar to a where clause in php. -- David M.

Re: [PHP] Re: Differences

2012-10-04 Thread David McGlone
On Thursday, October 04, 2012 06:06:50 PM Jim Giner wrote: > On 10/3/2012 8:48 PM, David McGlone wrote: > > Hi everyone, I have been playing around with some code the list helped me > > with a while back and I'm not grasping the concept between return and > > echo and the

Re: [PHP] Differences

2012-10-03 Thread David McGlone
gt; > Make more sense? Absolutely. I also think I learned that return can also work like echo if the code is written correctly. > > David McGlone wrote: > >On Wednesday, October 03, 2012 08:55:29 PM admin wrote: > >> > Hi everyone, I have been playing around with s

Re: [PHP] Differences

2012-10-03 Thread David McGlone
On Thursday, October 04, 2012 03:01:12 AM Timmy Sjöstedt wrote: > Hi David, > > A "return" statement will immediately halt execution of the current > function and return to where it was called. > > In your case, the foreach loop will execute once and find a return &

Re: [PHP] Differences

2012-10-03 Thread David McGlone
); > > foreach($matches as $filename){ > > return $filename; > > > > } > > > >} > > > >echo completeImageFilename($row['MLS_No']); > > > >With the above code I only get the first image of each picture name, but > > when I

[PHP] Differences

2012-10-03 Thread David McGlone
re name, but when I change return to echo, it groups and displays all the pics that have the same picture name. -- David M.

Re: [PHP] Static constructor support

2012-09-27 Thread David Harkness
On Wed, Sep 26, 2012 at 2:29 PM, Yves Goergen wrote: > How do other languages than C# call that? :-) > Java has "static initializers" which work the same way: they are executed when the class is first loaded and before any code can make use of the class. David

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread David OBrien
On Mon, Sep 24, 2012 at 3:06 PM, Daevid Vincent wrote: > > And for the love of [insert deity of your choice here] not EVERYTHING has > to be OOP. Use the best tool for the job!! Nothing pisses me off more than > having to instantiate a new class just to do some simple method that a > standard fun

Re: [PHP] Bounce messages

2012-09-21 Thread David McGlone
as > the copy of my post. Actually it's not as bad as it has been ... I was > expecting a few more after I posted the comment. > > And Yes tamouse ... it's having to replace a block of return addresses with > just the list address to tidy things up. A long list of addresses can build > up when everyone uses 'reply all' where as many other lists just need > 'reply' so nowadays I only use reply - and hopefully remember to change to > the the list address :) I use "reply to mailing list" in Kontact. -- David M. David's Webhosting and consulting.

Re: [PHP] Highlight Search Results

2012-09-18 Thread David OBrien
On Tue, Sep 18, 2012 at 8:36 AM, Floyd Resler wrote: > > I want to highlight the word searched in search results. I know I can use str_ireplace to do a case insensitive search and replace. However, is there an easy way to maintain the case of the word found when I do the replace? > > Thanks! > F

Re: [PHP] a little trickery

2012-09-09 Thread David McGlone
On Sunday, September 09, 2012 03:02:17 PM Stuart Dallas wrote: > On 9 Sep 2012, at 04:19, David McGlone wrote: > > On Saturday, September 08, 2012 03:49:27 PM you wrote: > >> On 8 Sep 2012, at 15:35, David McGlone wrote: > >>> I have a function that reads a directo

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 11:19:29 PM David McGlone wrote: > On Saturday, September 08, 2012 03:49:27 PM you wrote: > > > > > function completeImageFilename($prefix) > > { > > > > $matches = glob('images/property_pics/

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 03:49:27 PM you wrote: > On 8 Sep 2012, at 15:35, David McGlone wrote: > > I have a function that reads a directory and gets all the file names of > > images, and I am wondering if it's possible to concatinate this function > > withi

[PHP] a little trickery

2012-09-08 Thread David McGlone
d the contents is: 123456789 In my images folder I have an image named 123456789_R13_1.jpg My goal: get the MSL_No out of the DB and concatenate anything after it so I would end up with the whole image name.. I hope this all made sense. :-/ -- Regards David M.

Re: [PHP] array.sorting.php

2012-09-04 Thread David OBrien
On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston < jt.johns...@usherbrooke.ca> wrote: > Hi, > Sorting question. > http://www.php.net/manual/en/**array.sorting.php > I'm using ksort, which sorts like this. > I don't want to use strolower. > Is th

Re: [PHP] templeting

2012-09-03 Thread David McGlone
On Monday, September 03, 2012 09:45:23 PM David OBrien wrote: > On Sep 3, 2012 9:15 PM, "David McGlone" wrote: > > Does anyone use any templeting system for any projects? If so what would > > anyone recommend? I looked at Code Ignitor, but it seems the templeting > &

Re: [PHP] templeting

2012-09-03 Thread David OBrien
On Sep 3, 2012 9:15 PM, "David McGlone" wrote: > > Does anyone use any templeting system for any projects? If so what would > anyone recommend? I looked at Code Ignitor, but it seems the templeting system > is optional and left out by default. > > -- > Regards > David M. I use smarty

[PHP] templeting

2012-09-03 Thread David McGlone
Does anyone use any templeting system for any projects? If so what would anyone recommend? I looked at Code Ignitor, but it seems the templeting system is optional and left out by default. -- Regards David M.

Re: [PHP] load rtf file

2012-09-03 Thread David OBrien
On Mon, Sep 3, 2012 at 12:56 PM, Matijn Woudt wrote: > On Mon, Sep 3, 2012 at 5:24 PM, Tedd Sperling wrote: > > On Sep 3, 2012, at 1:23 AM, John Taylor-Johnston > wrote: > > > >> I have a big giant RTF file. I could convert it to plain text. BUT can > PHP do it for me? > > > > Hell, even M$ can

Re: [PHP] include selectively or globally?

2012-08-28 Thread David Harkness
On Tue, Aug 28, 2012 at 12:11 PM, Matijn Woudt wrote: > On Tue, Aug 28, 2012 at 6:55 PM, David Harkness > wrote: > > On Tue, Aug 28, 2012 at 4:39 AM, Matijn Woudt wrote: > >> > >> First of all, I believe [A] PHP is smart enough to not generate bytecode > >

Re: [PHP] include selectively or globally?

2012-08-28 Thread David Harkness
so trivial to maintain that single include in individual pages that the gain on 90% of the pages is not worth delving deeper. Peace, David

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread David OBrien
On Fri, Aug 24, 2012 at 11:16 AM, Jim Lucas wrote: > On 08/24/2012 08:01 AM, tamouse mailing lists wrote: > >> OT Reply -- just frustrated with the way email screws up program >> listings. It's a royal pain to have to strip out code and then put it >> in an editor and tidy it up just to be able t

Re: [PHP] mysqlnd and mysqli as shared extensions?

2012-08-20 Thread David OBrien
On Mon, Aug 20, 2012 at 10:20 AM, Lester Caine wrote: > Can mysqlnd be built as a shared module? > > make test is telling me the resulting .so is not a valid > "Warning: PHP Startup: Invalid library (maybe not a PHP library) > 'mysqlnd.so' in Unknown on line 0" > > I'm still on PHP5.4.3 on that m

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread David OBrien
On Thu, Aug 16, 2012 at 12:40 PM, Tristan wrote: > I can't for the life of me figure out how to find the depth of the array > that I'm looping through to output tabs or indentations to the display for > each depth. The entries also have section postition if you can figure out > how to include tha

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread David Harkness
;s easier to change the implementation without having to change all the places you access it. Peace, David

Re: [PHP] PHP session variables

2012-08-08 Thread David Harkness
On Wed, Aug 8, 2012 at 8:24 AM, Ansry User 01 wrote: > I am setting the _SESSION variables in one of my file, but whenever I > leave the php page session variables are not accessible. As always, post some code demonstrating what you're doing. Help us help you! :) David

Re: [PHP] Mac 10.7 Install/Copy fresh PHP over Pre-Installed PHP

2012-07-30 Thread David OBrien
On Mon, Jul 30, 2012 at 10:21 AM, JeffPGMT wrote: > Tamara, I said dll, but that was only my ignorant/windows reference to a > system lib/bin file. I followed a blog post (bitly'ed below); I got as far > as un-tar'ing and "make" was not available. > > I have other stacks Xampp (beta for Mac not f

Re: [PHP] Re: Regex

2012-07-27 Thread David Harkness
On Fri, Jul 27, 2012 at 11:43 AM, Al wrote: > "%[\w\d,.]%" > "\w" will match digits so "\d" isn't necessary, but it will also match underscores which isn't desired. David

Re: [PHP] Regex

2012-07-27 Thread David Harkness
On Fri, Jul 27, 2012 at 10:16 AM, Ashley Sheridan wrote: > "Simon Dániel" wrote: > > >#[0-9a-zA-Z,\.]# > > You should escape out that period as it will match any character otherwise > The dot only matches a period inside a character class [...]. David

  1   2   3   4   5   6   7   8   9   10   >