Re: [PHP] use JSON storage on RAMdisk instead of SQL? (for fast moving sites)

2012-09-06 Thread Bastien Koert
On Thu, Sep 6, 2012 at 2:28 PM, Matijn Woudt wrote: > Op 6 sep. 2012 12:48 schreef "rene7705" het volgende: >> >> Hi Folks.. > >> >> I seem to have figured most of this out, but before I embark on weeks >> of coding, I'd like to give the SQL experts here a chance to convince >> me to stick to My

Re: [PHP] use JSON storage on RAMdisk instead of SQL? (for fast moving sites)

2012-09-06 Thread Matijn Woudt
Op 6 sep. 2012 12:48 schreef "rene7705" het volgende: > > Hi Folks.. > > I seem to have figured most of this out, but before I embark on weeks > of coding, I'd like to give the SQL experts here a chance to convince > me to stick to MySQL for my data storage and distribution needs. I'd > love to h

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás wrote: > You want to do it in a greater text, I think. See below. > 1,$s/^>(>*From )/\1/ > > $line = preg_replace ($pattern, $replacement, $line); > > Adding one '>': > > preg_replace('/(^[>]+From )/','>$1', $line) > > Removing one '>': > > preg_replace('/(

Re: RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:57, Dajka Tamás wrote: > You want to do it in a greater text, I think. > > 1,$s/^>(>*From )/\1/ > > $line = preg_replace ($pattern, $replacement, $line); > > Adding one '>': > > preg_replace('/(^[>]+From )/','>$1', $line) > > Removing one '>': > > preg_replace('/(^>([>]+From

RE: RE: [PHP] Use of preg_replace

2011-07-24 Thread Dajka Tamás
;([>]+From )/','$1', $line) Cheers, Tamas -Original Message- From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Sunday, July 24, 2011 8:51 PM To: Dajka Tamás; PHP General List Subject: Re: RE: [PHP] Use of preg_replace On 24 Jul 2011 at 19:35, Dajka Tamás

Re: RE: [PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
On 24 Jul 2011 at 19:35, Dajka Tamás wrote: > I lost trail, what do you want to do? > > You want to convert > From > > to this: > >>> From The number of > in front of "From " is not known. I want to be able to add or remove one. -- Cheers -- Tim -- PHP General Mailing List (http://ww

RE: [PHP] Use of preg_replace

2011-07-24 Thread Dajka Tamás
Hi, I lost trail, what do you want to do? You want to convert >>>From to this: >>From Or what's the goal? Cheers, Tamas -Original Message- From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Sunday, July 24, 2011 8:07 PM To: PHP General List S

[PHP] Use of preg_replace

2011-07-24 Thread Tim Streater
I need to be able to convert a line of the form: >>>From to have either one more or one less > at the front. A web site tells me that the regexps to use are: 1,$s/^>*From />&/ and 1,$s/^>(>*From )/\1/ respectively (there is a single space after "From"). So, if my text string is in $line, I

Re: [PHP] Use PHP the way God intended...

2010-12-14 Thread Daniel Brown
On Tue, Dec 14, 2010 at 11:43, Paul M Foster wrote: > > Er... that's Paul McCartney, not Paul Foster. Whew! HA! Sorry to make your heart jump. ;-P -- Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Use PHP the way God intended...

2010-12-14 Thread David Harkness
On Tue, Dec 14, 2010 at 8:43 AM, Paul M Foster wrote: > Er... that's Paul McCartney, not Paul Foster. Whew! > Paul McCartney's dead?? But the Beatles just released a ton of albums on iTunes! So sad...

Re: [PHP] Use PHP the way God intended...

2010-12-14 Thread Paul M Foster
On Tue, Dec 14, 2010 at 11:15:59AM -0500, Daniel Brown wrote: > On Tue, Dec 14, 2010 at 09:29, Robert Cummings wrote: > > > > I must have been under a rock when the reference came out :| > > Or you may have still been in shock from hearing that Paul was dead. Er... that's Paul McCartney, no

Re: [PHP] Use PHP the way God intended...

2010-12-14 Thread Daniel Brown
On Tue, Dec 14, 2010 at 09:29, Robert Cummings wrote: > > I must have been under a rock when the reference came out :| Or you may have still been in shock from hearing that Paul was dead. -- Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General

Re: [PHP] Use PHP the way God intended...

2010-12-14 Thread Robert Cummings
On 10-12-14 07:11 AM, Jay Blanchard wrote: [snip] Nah, if he'd read it backwards, you'd be able to hear MePHPistoPHPeles say, "Rasmus is the Penguin". (Yes, you have to be dang old to get that obscure reference. ;-) Pshaw, not *that* old! I get the reference, and I'm only . . . oh, damn. :(

RE: [PHP] Use PHP the way God intended...

2010-12-14 Thread Jay Blanchard
[snip] > Nah, if he'd read it backwards, you'd be able to hear MePHPistoPHPeles > say, "Rasmus is the Penguin". > > (Yes, you have to be dang old to get that obscure reference. ;-) > Pshaw, not *that* old! I get the reference, and I'm only . . . oh, damn. :( [/snip] Uhhyeah -- PHP Genera

Re: [PHP] Use PHP the way God intended...

2010-12-13 Thread David Harkness
On Mon, Dec 13, 2010 at 8:48 PM, Paul M Foster wrote: > Nah, if he'd read it backwards, you'd be able to hear MePHPistoPHPeles > say, "Rasmus is the Penguin". > > (Yes, you have to be dang old to get that obscure reference. ;-) > Pshaw, not *that* old! I get the reference, and I'm only . . . oh,

Re: [PHP] Use PHP the way God intended...

2010-12-13 Thread Paul M Foster
On Mon, Dec 13, 2010 at 11:04:52PM -0500, Robert Cummings wrote: > On 10-12-13 07:28 PM, Daevid Vincent wrote: > > > > [snip] > > > >I believe it was in the Old PHPestament, > >"The Book of Rasmus" chapter 42 verse 69... > > > >66 ... > >67 And behold as he opened the 5th point 2nd seal > >68

Re: [PHP] Use PHP the way God intended...

2010-12-13 Thread Robert Cummings
On 10-12-13 07:28 PM, Daevid Vincent wrote: -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Friday, December 10, 2010 6:54 AM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] ORM doctrine On 10-12-09 10:41 PM, Daevid Vincent wrote: Use

RE: [PHP] Use PHP the way God intended...

2010-12-13 Thread Daevid Vincent
> -Original Message- > From: Robert Cummings [mailto:rob...@interjinn.com] > Sent: Friday, December 10, 2010 6:54 AM > To: Daevid Vincent > Cc: php-general@lists.php.net > Subject: Re: [PHP] ORM doctrine > > On 10-12-09 10:41 PM, Daevid Vincent wrote: > > Use PHP the way God intended i

RE: [PHP] use of ini vs include file for configuration

2010-11-11 Thread Daevid Vincent
> -Original Message- > From: Tamara Temple [mailto:tamouse.li...@gmail.com] > Sent: Thursday, November 11, 2010 11:04 AM > To: PHP General > Subject: [PHP] use of ini vs include file for configuration > > I'm curious what the lists' opinions are regarding

[PHP] use of ini vs include file for configuration

2010-11-11 Thread Tamara Temple
I'm curious what the lists' opinions are regarding the use of an .ini file versus an include configuration file in PHP code are? I can see uses for either (or both). To me, it seems that an .ini file would be ideal in the case where you want to allow a simpler interface for people installing

[PHP] Use specific IP for outbound traffic.

2009-12-04 Thread shiplu
Hello, I have 3 IPs in my VPS. Everytime I request to a site it uses only 1 IP as gateway. So all the outbound traffic goes thorough that IP. What I want is one of my script will always communicate using an specific ip. Not default one. I'll use 3 scripts for 3 IPs. How can I do that? I know it can

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-09 Thread Ben Dunlap
> > $pattern = '|^.+?display:none.+?$|mi'; [8<] > I found your use of ? rather... creative...  Anyway, just add the You mean the non-greedy flag? I think that's necessary the way the regex was originally formulated -- without it, ".+display" would gobble up all of the list-items until the last one

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread LinuxManMikeC
On Sun, Aug 9, 2009 at 12:17 AM, Rob Gould wrote: > I wish I could say this works, but I'm not having success with this pattern. >  All the lines with display: none are still in the $bl string. > > On Aug 9, 2009, at 1:50 AM, LinuxManMikeC wrote: > > Reserved Frontstretch > > Tower Ticket to the Ca

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread Rob Gould
Yay! That worked. Thanks! On Aug 9, 2009, at 1:53 AM, Michael A. Peters wrote: Rob Gould wrote: I have a bunch of bullets in a list coming from a previous post, and I need to eliminate any line from this string that contains "display: none" Reserved Frontstretch Tower Ticket to the Cam

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread Rob Gould
I wish I could say this works, but I'm not having success with this pattern. All the lines with display: none are still in the $bl string. On Aug 9, 2009, at 1:50 AM, LinuxManMikeC wrote: Reserved Frontstretch Tower Ticket to the Camping World 300 on Saturday Reserved Frontstretch T

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread Michael A. Peters
Rob Gould wrote: I have a bunch of bullets in a list coming from a previous post, and I need to eliminate any line from this string that contains "display: none" Reserved Frontstretch Tower Ticket to the Camping World 300 on Saturday Reserved Frontstretch Tower Ticket to the Daytona 500 on

Re: [PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread LinuxManMikeC
On Sat, Aug 8, 2009 at 11:14 PM, Rob Gould wrote: > I have a bunch of bullets in a list coming from a previous post, and I need > to eliminate any line from this string that contains "display: none" > > > Reserved Frontstretch > Tower Ticket to the Camping World 300 on Saturday > Reserved Frontstr

[PHP] use preg_replace to nix and line with "display: none"

2009-08-08 Thread Rob Gould
I have a bunch of bullets in a list coming from a previous post, and I need to eliminate any line from this string that contains "display: none" Reserved Frontstretch Tower Ticket to the Camping World 300 on Saturday Reserved Frontstretch Tower Ticket to the Daytona 500 on Sunday

[PHP] use bundled pcre in php 5.2.9 w/ apache 2.2?

2009-04-13 Thread Tom Worster
upgrading to 5.2.9 on freebsd using the ports, the question was asked: Use BUNDLED_PCRE (Select if you use apache 2.0.x) - Y/N? i use apache 2.2.x so i'd guess the answer would be no. but i'm not sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Michael A. Peters
Bob McConnell wrote: From what I have seen of PHP, it is strictly interpreted. i.e. a line is read, and executed. Then the next line is read, and executed. etc. So there is no way to get it to block execution from the beginning even when there are fatal errors. It will already have printed out

RE: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Hans Schultz
So, in the end, following should output something in php? Anyway we are far off topic now :-) Cheers --- On Fri, 2/27/09, Bob McConnell wrote: From: Bob McConnell Subject: RE: [PHP] "use strict" or similar in PHP? To: h.schult...@yahoo.com, a...@ashleysheridan.co.uk Cc: p

RE: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Robert Cummings
On Fri, 2009-02-27 at 08:43 -0500, Bob McConnell wrote: > From: Hans Schultz > > > > Hahahah,I was thinking the same thing :D > > > > --- On Fri, 2/27/09, Ashley Sheridan wrote: > > From: Ashley Sheridan > > Subject: Re: [PHP] "use strict" or si

RE: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Boyd, Todd M.
> -Original Message- > From: Bob McConnell [mailto:r...@cbord.com] > Sent: Friday, February 27, 2009 7:44 AM > To: h.schult...@yahoo.com; a...@ashleysheridan.co.uk > Cc: php-general@lists.php.net; 9el > Subject: RE: [PHP] "use strict" or similar in

RE: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Bob McConnell
From: Hans Schultz > > Hahahah,I was thinking the same thing :D > > --- On Fri, 2/27/09, Ashley Sheridan wrote: > From: Ashley Sheridan > Subject: Re: [PHP] "use strict" or similar in PHP? > To: "Hans Schultz" > Cc: php-general@lists.php.net, "

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Robert Cummings
On Fri, 2009-02-27 at 13:11 +, Ashley Sheridan wrote: > But if it never compiles, it can never run, but it can't run without > compiling? Arggh, my head. So does that mean if I go back in time and > shoot my grandfather, then nobody is in the woods to hear PHP try to > compile? There's a blurr

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Hans Schultz
Hahahah,I was thinking the same thing :D --- On Fri, 2/27/09, Ashley Sheridan wrote: From: Ashley Sheridan Subject: Re: [PHP] "use strict" or similar in PHP? To: "Hans Schultz" Cc: php-general@lists.php.net, "9el" Date: Friday, February 27, 2009, 1:11 PM On

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Ashley Sheridan
On Fri, 2009-02-27 at 14:04 +0100, Hans Schultz wrote: > Sorry, I didn't want to offend anyone :-) It was just very weird argument > - to quote: > "There is no "compile" time. PHP is interpreted so it is compiled and > then executed." > Sounds like contradiction in this very sentence :-). > >

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Hans Schultz
Sorry, I didn't want to offend anyone :-) It was just very weird argument - to quote: "There is no "compile" time. PHP is interpreted so it is compiled and then executed." Sounds like contradiction in this very sentence :-). My apologies On Fri, 27 Feb 2009 10:22:44 +0100, 9el wrote: --

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Michael A. Peters
9el wrote: --- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com --

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread Hans Schultz
On Thu, 26 Feb 2009 22:38:13 +0100, Shawn McKenzie wrote: There is no "compile" time. PHP is interpreted so it is compiled and then executed. If you always want error reporting, then set it in php.ini. It is compiled in no time, so there is no compile time? LOL -- Using Opera's revolut

Re: [PHP] "use strict" or similar in PHP?

2009-02-27 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Per Jessen
Hans Schultz wrote: > Is there some way for PHP to cache some data on the page? I like very > much PHP's speed but it would be even better to be able to cache some > frequently used data from database? Databases such as MySQL are very good at caching. -- Per Jessen, Zürich (3.6°C) -- PHP G

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Shawn McKenzie
Hans Schultz wrote: > Thanks a lot for your info, I will check that IDE too. But those > warning levels give me warning only when they encounter offending > code? Are you telling me that it can be setup to fail entire script > prior to any execution if there are errors in it? Can you please > point

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Hans Schultz
installation that way? --- On Thu, 2/26/09, 9el wrote: From: 9el Subject: Re: [PHP] "use strict" or similar in PHP? To: h.schult...@yahoo.com Date: Thursday, February 26, 2009, 9:34 PM --- Use FreeOpenSourceSoftwares, S

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Shawn McKenzie
Hans Schultz wrote: > Oh, I didn't mentioned that I tried that, I was thinking something like > failing at compile time (like perl with "use strict" in programs)Thanks for > reply, > Hans > --- On Thu, 2/26/09, Lewis Wright wrote: > From: Lewis Wright >

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Ovidiu Rosoiu
On Thu, Feb 26, 2009 at 10:45 PM, Hans Schultz wrote: > Hello, > I am beginner with PHP and prior to PHP I have worked with java for some > time > and with perl for very short period. I can't help to notice some things > that > are little annoyance for me with PHP, but I am sure someone more > exp

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Spam Recipient
I have no ideea why my response from half an hour ago was not sent, but here it is again: 1. Error reporting set to show notices, warnings and errors. See http://www.php.net/manual/en/function.error-reporting.php 2. For caching you can use memcache. See http://www.php.net/memcache 3. These are c

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Hans Schultz
Oh, I didn't mentioned that I tried that, I was thinking  something like failing at compile time (like perl with "use strict" in programs)Thanks for reply, Hans --- On Thu, 2/26/09, Lewis Wright wrote: From: Lewis Wright Subject: Re: [PHP] "use strict" or similar in PH

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Hans Schultz
I was thinking more of something to fail at compile time if possible :-)regarding second, that solution with sprintf is vulnerable to SQL injection, that is why I wanted something with parameters, instead of escaping everything myself Thanks for your help anyway --- On Thu, 2/26/09, 9el wrote:

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Ovidiu Rosoiu
Hans Schultz wrote: Hello, I am beginner with PHP and prior to PHP I have worked with java for some time and with perl for very short period. I can't help to notice some things that are little annoyance for me with PHP, but I am sure someone more experienced can help me :-) Is there in PHP so

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- 20

Re: [PHP] "use strict" or similar in PHP?

2009-02-26 Thread Lewis Wright
Yes you can use: error_reporting(E_ALL); Which will enable notices. You can even do: error_reporting(E_ALL | E_STRICT); To enable strict messages. Lewis. 2009/2/26 Hans Schultz : > Hello, > I am beginner with PHP and prior to PHP I have worked with java for some > time > and with perl for ver

[PHP] "use strict" or similar in PHP?

2009-02-26 Thread Hans Schultz
Hello, I am beginner with PHP and prior to PHP I have worked with java for some time and with perl for very short period. I can't help to notice some things that are little annoyance for me with PHP, but I am sure someone more experienced can help me :-) Is there in PHP something like "use

Re: [PHP] use of static methods after namespaces arrive

2008-05-28 Thread Iv Ray
Adam Richardson wrote: If the functionality doesn't conceptually promote the inclusion of the variables it works on (i.e., no class variables), doesn't conceptually fit a scheme where instances can exist, and likely won't benefit from refactoring into component methods, then I could see using a

Re: [PHP] use of static methods after namespaces arrive

2008-05-28 Thread Adam Richardson
If the functionality doesn't conceptually promote the inclusion of the variables it works on (i.e., no class variables), doesn't conceptually fit a scheme where instances can exist, and likely won't benefit from refactoring into component methods, then I could see using a namespaced function. Most

[PHP] use of static methods after namespaces arrive

2008-05-28 Thread Iv Ray
In which situation would somebody use a static method, instead of a function in a namespace, after the namespaces arrive with 5.3? Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Use of callback on a stream

2008-03-28 Thread Olivier Dupuis
Hello, I am trying to make a daemon that launches shell commands via proc_open and gets the stdout of the command via a pipe. The thing is that I would like to get this stdout via a callback, instead of monitoring the pipe regularly. I tried the following code (this is a simplified version of

[PHP] Use of callback on a stream

2008-03-28 Thread Olivier Dupuis
Hello, I am trying to make a daemon that launches shell commands via proc_open and gets the stdout of the command via a pipe. The thing is that I would like to get this stdout via a callback, instead of monitoring the pipe regularly. I tried the following code (this is a simplified version of

[PHP] Use sessions from own php-extension

2007-05-17 Thread hw
Hi there. I'm developing php-extension in C++ and want to use session handling from ext/session . Is it possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Richard Lynch
On Mon, January 29, 2007 5:36 pm, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-29 17:32:43 -0600: >> > Mon, January 29, 2007 11:55 am, Roman Neuhauser wrote: >> > # [EMAIL PROTECTED] / 2007-01-29 09:19:41 -0800: >> >> I remember this discussion 7 years ago. This feature is not >> >> poss

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 17:32:43 -0600: > > Mon, January 29, 2007 11:55 am, Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-29 09:19:41 -0800: > >> I remember this discussion 7 years ago. This feature is not > >> possible. > > > > I also remember the debate, but don't recall why

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Richard Lynch
> Mon, January 29, 2007 11:55 am, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-29 09:19:41 -0800: >> I remember this discussion 7 years ago. This feature is not >> possible. > > I also remember the debate, but don't recall why it's not possible, > AFAIR it was shot down because someone o

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Richard Lynch
On Mon, January 29, 2007 7:03 am, [EMAIL PROTECTED] wrote: > What's the best way to achieve something like this: > explode($needle, $array)[3] > It's too clumsy to use temporary array, and I suppose, quite slow. Is > there any option, or I'll have to stick to temporary arrays? Maybe some kind of p

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Jim Lucas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-29 09:19:41 -0800: I remember this discussion 7 years ago. This feature is not possible. I also remember the debate, but don't recall why it's not possible, AFAIR it was shot down because someone on php-dev@ said so. Thats what I remember

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 09:19:41 -0800: > I remember this discussion 7 years ago. This feature is not possible. I also remember the debate, but don't recall why it's not possible, AFAIR it was shot down because someone on php-dev@ said so. -- How many Vietnam vets does it take to screw

Re: [PHP] Use array returned by function directly?

2007-01-29 Thread Jim Lucas
[EMAIL PROTECTED] wrote: What's the best way to achieve something like this: explode($needle, $array)[3] It's too clumsy to use temporary array, and I suppose, quite slow. Is there any option, or I'll have to stick to temporary arrays? Best Regards, Ivailo Karamanolev I think you are meaning

Re: [PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread Myron Turner
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-29 10:12:25 -0600: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-29 15:27:21 +: # crash #assert(2 == returns_array()['c']); # still crash #assert(2 == returns_array()['c']); s/crash/syntax error/

Re: [PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 10:12:25 -0600: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2007-01-29 15:27:21 +: > >># crash > >>#assert(2 == returns_array()['c']); > > > >># still crash > >>#assert(2 == returns_array()['c']); > > > >s/crash/syntax error/ > > You can do this in Perl: >

Re: [PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread Myron Turner
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-29 15:27:21 +: # crash #assert(2 == returns_array()['c']); # still crash #assert(2 == returns_array()['c']); s/crash/syntax error/ You can do this in Perl: my $c = (fn(@a))[2]; But in PHP, this is a syntax erro

Re: [PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 15:27:21 +: > # crash > #assert(2 == returns_array()['c']); > # still crash > #assert(2 == returns_array()['c']); s/crash/syntax error/ -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't TH

Re: [PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 16:07:39 +0200: > [EMAIL PROTECTED] wrote: > >What's the best way to achieve something like this: > >explode($needle, $array)[3] > >It's too clumsy to use temporary array, and I suppose, quite slow. Is > >there any option, or I'll have to stick to temporary arrays?

[PHP] Re: [BULK] [PHP] Use array returned by function directly?

2007-01-29 Thread clive
[EMAIL PROTECTED] wrote: What's the best way to achieve something like this: explode($needle, $array)[3] It's too clumsy to use temporary array, and I suppose, quite slow. Is there any option, or I'll have to stick to temporary arrays? Not sure what you are trying to do. 1. Are you trying to

[PHP] Use array returned by function directly?

2007-01-29 Thread ivailo91
What's the best way to achieve something like this: explode($needle, $array)[3] It's too clumsy to use temporary array, and I suppose, quite slow. Is there any option, or I'll have to stick to temporary arrays? Best Regards, Ivailo Karamanolev -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Use of substr()

2006-11-03 Thread Richard Lynch
On Fri, November 3, 2006 12:33 am, jekillen wrote: > I am scratching my head over the following: > I have written code that is supposed to format text > sent from a form in a textarea form element. > This text does not have new lines added if > the text is allowed to automatically wrap to the > nex

Re: [PHP] Use of substr()

2006-11-02 Thread Shuping Zhou
function format_text($a, $b) // $a is text to format, from textarea, $b is line length { $line = array(); $limit = (strlen($a)/$b); for($i = 0; $i < $limit; $i++) { $start =

Re: [PHP] Use of substr()

2006-11-02 Thread Chris
jekillen wrote: Hello all; I am scratching my head over the following: I have written code that is supposed to format text sent from a form in a textarea form element. This text does not have new lines added if the text is allowed to automatically wrap to the next line. I want to automatically ad

[PHP] Use of substr()

2006-11-02 Thread jekillen
Hello all; I am scratching my head over the following: I have written code that is supposed to format text sent from a form in a textarea form element. This text does not have new lines added if the text is allowed to automatically wrap to the next line. I want to automatically add new lines to th

Re: [PHP] Use PHP to disable htaccess

2006-10-05 Thread Richard Lynch
On Thu, October 5, 2006 2:50 pm, Justin Cook wrote: > I took over a website that uses a htaccess file to auto append a file > to every page. I have one page that I do not want to do this one. Is > there a way to disable the htaccess file with a php statement on this > one page? Thanks! Not with a

[PHP] Use PHP to disable htaccess

2006-10-05 Thread Justin Cook
I took over a website that uses a htaccess file to auto append a file to every page. I have one page that I do not want to do this one. Is there a way to disable the htaccess file with a php statement on this one page? Thanks!

Re: [PHP] Use VAR string value AS VAR Name

2006-01-26 Thread Richard Lynch
On Wed, January 25, 2006 6:11 pm, Fernando Anchorena wrote: > I'm stuck trying to get work this : > > This is an example > page1.php > === > > $sql_pro ="SELECT Sid FROM table"; > $res_pro = @mysql_query( $sql_pro); >while ($campo_pro = @mysql_fetch_array($

RE: [PHP] Use VAR string value AS VAR Name

2006-01-25 Thread Mark Steudel
Sorry I totally didn't read the question fully -Original Message- From: Mark Steudel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 4:28 PM To: php-general@lists.php.net Subject: RE: [PHP] Use VAR string value AS VAR Name Either try: $sid_pro = "p".$s

RE: [PHP] Use VAR string value AS VAR Name

2006-01-25 Thread Mark Steudel
Either try: $sid_pro = "p".$sid_pro; or try: -Original Message- From: Fernando Anchorena [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 4:12 PM To: php-general@lists.php.net Subject: [PHP] Use VAR string value AS VAR Name I'm stuck trying to get work thi

[PHP] Use VAR string value AS VAR Name

2006-01-25 Thread Fernando Anchorena
I'm stuck trying to get work this : This is an example page1.php === $sql_pro ="SELECT Sid FROM table"; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro["Sid"]; // *sid_pro = 4* $sid

RE: [PHP] Use of Ampersand in php

2006-01-23 Thread Richard Correia
-general@lists.php.net Subject: [PHP] Use of Ampersand in php Hi everybody, Can any one tell me, what is the use of ampersand '&' in php? Is it a pointer operator like 'C' language? Kindly note the example After running this example I got result 1 for both va

Re: [PHP] Use of Ampersand in php

2006-01-22 Thread Michael Hulse
On Jan 22, 2006, at 7:04 PM, Nirmalya Lahiri wrote: Can any one tell me, what is the use of ampersand '&' in php? This might help: http://us2.php.net/manual/en/language.references.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Use of Ampersand in php

2006-01-22 Thread Nirmalya Lahiri
Hi everybody, Can any one tell me, what is the use of ampersand '&' in php? Is it a pointer operator like 'C' language? Kindly note the example After running this example I got result 1 for both variable $b and $c. Why so? --Nirmalya __ Do

Re: [PHP] use SMB share to run php files

2005-11-08 Thread Richard Lynch
On Sun, November 6, 2005 1:32 pm, Ross wrote: > Ok been looking into in and know a bit of terminology now. > > I have an SMB share on my mac which is my WWWROOT folder on my windows > computer. These files have all permissions enabled so I can edit in > dreamweaver (on mac). All I want to so is set

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Dan Trainor wrote: > Curt Zirzow wrote: > >>On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: >> >> >>>Dan Trainor wrote: >>> >>> Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Curt Zirzow
On Tue, Nov 08, 2005 at 02:25:03PM -0700, Dan Trainor wrote: > Curt Zirzow wrote: > > On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: > >>... > >> > >> > >>DocumentRoot /var/www/virtual > >>... > >># begin dan's protected directory stuff > >> > >>

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Curt Zirzow wrote: > On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: > >>Dan Trainor wrote: >> >>>Good afternoon, all - >>> >>>I've had problems with auto_prepend_file off and on for as long as I can >>>remember. It's hit or miss, and browsing the archives, it looks like >>>I'm not a

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Curt Zirzow
On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: > Dan Trainor wrote: > > Good afternoon, all - > > > > I've had problems with auto_prepend_file off and on for as long as I can > > remember. It's hit or miss, and browsing the archives, it looks like > > I'm not alone. I've even writt

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Jasper Bryant-Greene wrote: > On Tue, 2005-11-08 at 13:43 -0700, Dan Trainor wrote: > >>Well, the problem is simple; it just doesn't work. No script is >>prepended to the page that I access from within /demo/protected. My >>prepend script consists of the following line of code: >> >>"; ?> >> >>

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Jasper Bryant-Greene
On Tue, 2005-11-08 at 13:43 -0700, Dan Trainor wrote: > Well, the problem is simple; it just doesn't work. No script is > prepended to the page that I access from within /demo/protected. My > prepend script consists of the following line of code: > > "; ?> > > Sorry about that. Thanks. Have y

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Jasper Bryant-Greene wrote: > On Tue, 2005-11-08 at 13:36 -0700, Dan Trainor wrote: > [snip] > >>>So, as you can see, nothing completely out of the 'norm. The examples >>>given in the manual are not all that clear, so by using absolute path >>>names, I'm just guessing. I have used relative paths

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Jasper Bryant-Greene
On Tue, 2005-11-08 at 13:36 -0700, Dan Trainor wrote: [snip] > > So, as you can see, nothing completely out of the 'norm. The examples > > given in the manual are not all that clear, so by using absolute path > > names, I'm just guessing. I have used relative paths as well - same thing. > > > >

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Dan Trainor wrote: > Good afternoon, all - > > I've had problems with auto_prepend_file off and on for as long as I can > remember. It's hit or miss, and browsing the archives, it looks like > I'm not alone. I've even written to the list on several occasions > looking for a solution, to no avail

[PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the archives, it looks like I'm not alone. I've even written to the list on several occasions looking for a solution, to no avail. I think that auto_{prepend,a

[PHP] use SMB share to run php files

2005-11-06 Thread Ross
Ok been looking into in and know a bit of terminology now. I have an SMB share on my mac which is my WWWROOT folder on my windows computer. These files have all permissions enabled so I can edit in dreamweaver (on mac). All I want to so is setup PHP/Apache so it recognises the WWWROOT folder a

Re: [PHP] Use sqlite with php 4.4 ?

2005-10-28 Thread Greg Donald
On Fri, 28 Oct 2005, mbneto wrote: is it possible to use sqlite with php 4.4 ? What do I have to do ? I could not find and option in ./configure. http://php.net/sqlite -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http:/

  1   2   3   >