Re: [PHP] Auto-generating HTML

2010-09-20 Thread Rick Pasotto
t; > > Thanks, > > Alex > > Alex > > Just add a \n at the end as > > echo '\n'; That will not work. Single quotes means that the '\n' is not interpreted as a new line so you'll see a bunch of '\n' in the output. What I sometimes do is: $out = array(); $out[] = ''; $out[] = ''; $out[] = ' Page Title'; $out[] = ''; $out[] = ''; $out[] = 'This is the page body'; $out[] = ''; $out[] = ''; echo join("\n",$out); -- "Act as if you were already happy and that will tend to make you happy." -- Dale Carnegie Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strtotime()

2010-08-23 Thread Rick Pasotto
On Mon, Aug 23, 2010 at 11:38:41PM -0400, Daniel P. Brown wrote: > On Mon, Aug 23, 2010 at 22:27, Rick Pasotto wrote: > > > > After I sent my original post the one and only user comment on the > > relative date strings man page was pointed out to me. So, it's there but

Re: [PHP] strtotime()

2010-08-23 Thread Rick Pasotto
and subtract one day $t2 = strtotime(date('Y-m',$t1 + (86400 * 70)))-86400; -- "I'm so optimistic I'd go after Moby Dick in a row boat and take the tartar sauce with me." -- Zig Zigler Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] strtotime()

2010-08-23 Thread Rick Pasotto
vider running 5.2.13 on BSD and both give '1969-12-31'. What could be causing this? The second command is straight from the manual and the first is clearly implied. So far everything else seems to work as expected. -- "Economics is extremely useful as a form of employment for econom

Re: [PHP] HTML in emails

2010-07-04 Thread Rick Pasotto
gt; > We follow the standard and send both text and html. The text portion is the *only* portion I read. -- "When dealing with people, remember you are not dealing with creatures of logic, but creatures of emotion." -- Dale Carnegie Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] not receiving mail from list

2010-06-20 Thread Rick Pasotto
laughs does not believe in what he laughs at, but neither does he hate it. Therefore, laughing at evil means not preparing oneself to combat it, and laughing at good means denying the power through which good is self-propagating. -- Umberto Eco, "The Name of the Rose" Rick Pa

Re: [PHP] function within a class function

2010-06-20 Thread Rick Pasotto
On Sun, Jun 20, 2010 at 08:47:53PM -0400, Brandon Rampersad wrote: > $this->usort(); > self::usort(); > > On Sun, Jun 20, 2010 at 7:45 PM, Rick Pasotto wrote: > > > Within a class function I have defined another function for use with the > > usort() function. How d

[PHP] function within a class function

2010-06-20 Thread Rick Pasotto
T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? -- "Memory is like an orgasm. It's a lot better if you don't have to fake it." -- Seymour Cray (on virtual memory) Rick Pasottor...@niof.nethttp://www.niof.net -- PHP Gener

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 02:35:54PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > >On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > >>Rick Pasotto wrote: > >>>I repeat: is there more than one way to run a php script from the cli? > >>>

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > > > >I repeat: is there more than one way to run a php script from the cli? > > > > On *nix, you can add "#!/usr/bin/php" as first line and make file > executable (chmod +

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > &

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > Has cli php changed recently? > > > > I've got a php script (script1) that creates a php script (script2) by > > opening a file an

[PHP] php-cli

2010-03-14 Thread Rick Pasotto
is always wise." -- Alexander Meiklejohn, 1955 Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Which query is more correct?

2009-11-20 Thread Rick Pasotto
explain of bot queries - but can't "read" them. :-) SELECT t1.* FROM registrants t1 LEFT JOIN ToBeRecleared t2 on t1.reg_id = t2.tbrc_reg_id where t2.tbrc_reg_id is NULL -- "Every major horror of history was committed in the name of an altruistic motive." -- Ayn Rand,

[PHP] Script sometimes not recognized as php

2009-08-30 Thread Rick Pasotto
pret a php script as php? -- The difficulties which I meet with in order to realize my existence are precisely what awaken and mobilize my activities, my capacities. Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

[PHP] mail() is duplicating

2009-03-13 Thread Rick Pasotto
usually idiotic. He is, more likely, one who likes his country more than the rest of us, and is thus more disturbed than the rest of us when he sees it debauched. He is not a bad citizen turning to crime; he is a good citizen driven to despair." --- H. L. Mencken Rick Pasottor

Re: [PHP] system() Question

2008-12-28 Thread Rick Pasotto
stem ( string $command [, int &$return_var ] ) You have to pass a pointer to the variable, not the variable itself. -- "Paper has a genius for multiplication that cannot be equaled anywhere else in nature." -- Hugh Keenleyside Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Request to bash/jump/screw my code

2008-12-08 Thread Rick Pasotto
osted by: \' OR id != \' On: 2008-12-08 13:24:59 \' OR id != \' -- "The greatest danger to liberty today comes from...expert administrators exclusively concerned with what they regard as the public good." -- Friedrich Hayek Rick Pasot

Re: [PHP] Request to bash/jump/screw my code

2008-12-08 Thread Rick Pasotto
On Mon, Dec 08, 2008 at 09:01:56AM -0800, Ryan S wrote: > > Any advise is also most welcome. 'Advise' is a verb. 'Advice' is a noun. No charge. -- "I didn't understand this at first, but YOUR CONVINCING USE OF CAPITAL LETTERS HAS MADE IT ALL CLEAR

Re: [PHP] A MySQL Question

2008-12-07 Thread Rick Pasotto
-Q-L". The > interviewer pronounced it the same as I, but I have heard others say > it differently. My-S-Q-L. Few people realize that 'sequel' was the language used by Ingres for their database and it was different from S-Q-L. -- "You are the only one who can use your a

Re: [PHP] Re: Form Loop

2008-10-18 Thread Rick Pasotto
27; size="2" value="' . $row['qty']. '" />'; > > However, I would use an array: > > echo ' size="2" value="' . $row['qty']. '" />'; > > Depending upon your use, you can even leave o

[PHP] when mysql is down

2008-10-17 Thread Rick Pasotto
include file. What's the best way to output nothing if the mysql connection fails? I realize these are probably elementary questions but any advice would be appreciated. -- "... the state ... is not armed with superior honesty, but with superior physical strength." -- Henry

[PHP] where to put a function

2008-04-14 Thread Rick Pasotto
bunch of functions that are not used on a given page load? -- "If some peoples pretend that history or geography gives them the right to subjugate other races, nations, or peoples, there can be no peace." -- Ludwig von Mises Rick Pasotto[EMAIL PROTECTED]http://www.ni

Re: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread Rick Pasotto
o preach eternal truths, and to bear witness to everlasting testimony against the giant falsehoods which bewitch and enslave the land." -- Nathaniel Peabody Rogers Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Why does the host make a difference?

2008-03-12 Thread Rick Pasotto
-- "There are two tragedies in life. One is to lose your heart's desire. The other is to gain it." -- George Bernard Shaw Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pear

2008-03-01 Thread Rick Pasotto
-- "... most legislators ... as they rarely make any moral distinctions, they are as likely to serve the devil, without intending it, as God." -- Henry David Thoreau Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] checking for and enforcing https

2008-02-26 Thread Rick Pasotto
from your losses. That requires intelligence, and makes the difference between a man of sense and a fool." -- Dale Carnegie Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] checking for and enforcing https

2008-02-25 Thread Rick Pasotto
What is the best or recomended proceedure for making sure that a page is accessed only via a secure connection? -- "The secret of being miserable is to have the leisure to bother about whether you are happy or not. The cure is occupation." -- George Bernard Shaw Rick Pasotto

Re: [PHP] explorer

2007-11-10 Thread Rick Pasotto
, Public Use of the Private Interest, 1977 Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Rick Pasotto
On Sun, Sep 16, 2007 at 06:04:45PM -0700, Richard Kurth wrote: > Richard Kurth wrote: >> Rick Pasotto wrote: >>> On Sun, Sep 16, 2007 at 07:09:02PM -0400, brian wrote: >>> >>>> Richard Kurth wrote: >>>> >>>>> $Campaign_array

Re: [PHP] Finding next recored in a array

2007-09-16 Thread Rick Pasotto
hing for the key that points to the > value '5'. What if the value '5' occurs more than once? >From the docs: "If needle is found in haystack more than once, the first matching key is returned. To return the keys for all matching values, use array_keys() w

Re: [PHP] string as file

2007-08-10 Thread Rick Pasotto
On Fri, Aug 10, 2007 at 02:19:29PM +0100, Stut wrote: > Rick Pasotto wrote: >> On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: >>> On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: >>>> Does php have a facility similar to python's stringIO? &g

Re: [PHP] string as file

2007-08-10 Thread Rick Pasotto
On Thu, Aug 09, 2007 at 02:39:51PM -0700, Jim Lucas wrote: > Rick Pasotto wrote: >> Does php have a facility similar to python's stringIO? >> What I'm wanting to do is similar to a mail merge. IOW, I know I can >> create an include file like: >> $out = <

Re: [PHP] string as file

2007-08-10 Thread Rick Pasotto
On Thu, Aug 09, 2007 at 03:25:27PM -0500, Greg Donald wrote: > On 8/9/07, Rick Pasotto <[EMAIL PROTECTED]> wrote: > > Does php have a facility similar to python's stringIO? > > > > What I'm wanting to do is similar to a mail merge. IOW, I know I can > >

[PHP] string as file

2007-08-09 Thread Rick Pasotto
Does php have a facility similar to python's stringIO? What I'm wanting to do is similar to a mail merge. IOW, I know I can create an include file like: $out = <

[PHP] preg_replace() help

2007-07-13 Thread Rick Pasotto
re for debugging. $matches contains what I expect but nothing gets replaced and $txt stays the same so it loops forever. What am I doing wrong? -- "Everyone is as God has made him, and oftentimes a great deal worse." -- Miguel De Cervantes Rick Pasotto[EMAIL PROTEC

Re: [PHP] triming utf8 (?) a string

2007-07-09 Thread Rick Pasotto
On Mon, Jul 09, 2007 at 07:45:10AM -0700, Jim Lucas wrote: > Rick Pasotto wrote: > >On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote: > >>Rick Pasotto wrote: > >>>I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted > >>

Re: [PHP] triming utf8 (?) a string

2007-07-09 Thread Rick Pasotto
On Sun, Jul 08, 2007 at 06:30:54PM -0700, Jim Lucas wrote: > Rick Pasotto wrote: > >I'm using the PEAR Crypt_Blowfish module. When I decrypt the encrypted > >string the result is the original plus some '\ufffd' bytes. How can I > >get rid of those extra bytes? I

[PHP] triming utf8 (?) a string

2007-07-08 Thread Rick Pasotto
ot;Economics is extremely useful as a form of employment for economists." -- John Kenneth Galbraith Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php