Hi,
Check if I understood you...
You have this array and want create a csv?
On Mon, Sep 1, 2008 at 5:04 AM, Tom Shaw <[EMAIL PROTECTED]> wrote:
> My array looks very similar to this. I need to create a single row for the
> items that have the same order number for CSV export. I'd prefer to do
>
My array looks very similar to this. I need to create a single row for the
items that have the same order number for CSV export. I'd prefer to do this
PHP wise instead of SQL. But would appreciate any help I can get.
$ar = array(
array(
"order_id" => "34",
"order_number" =>
Diogo Neves a écrit :
Hi,
Well, I see a good reason anyway...
U can have a lot of entry points and only one to exit...
Like:
I misunderstood the question :-/ I read Govinda had a strange
behavior that ignore the break :-D
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP Ge
On Mon, Sep 1, 2008 at 3:09 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> redirecting to generals mailing list ...
>
> Diogo Neves schreef:
>
>> php -r 'class B { private static function a() {} public function
>> __callStatic($method, $parms) { echo $method, "\n"; } } $a = new B;
>> $a::a();'
>>
>>
Govinda schreef:
Not that it is an issue, but just to understand the logic-
Why do we have to use 'break' statements in each case?
switch ($i) {
case 0:
echo "i equals 0";
break;
case 1:
echo "i equals 1";
break;
case 2:
echo "i equals 2";
break;
}
all 3 cases fire, even
redirecting to generals mailing list ...
Diogo Neves schreef:
php -r 'class B { private static function a() {} public function
__callStatic($method, $parms) { echo $method, "\n"; } } $a = new B;
$a::a();'
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in Command line
code on line
Old timers like it at the bottom, but I agree with the newcomers. Top
posting as long as it's not mixed with bottom posting can be easier for
people who follow the threads. (I know I mixed it here)
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Diogo Neves
Hi,
Well, I see a good reason anyway...
U can have a lot of entry points and only one to exit...
Like:
switch ($i) {
case 0:
echo "\$i < 1";
case 1:
echo "\$i < 2";
case 2:
echo "\$i < 3";
default:
echo "\$i > 2";
}
Or
switch ($i) {
case 0:
case 1:
case 2:
echo "\$i < 3";
brea
Not that it is an issue, but just to understand the logic-
Why do we have to use 'break' statements in each case?
switch ($i) {
case 0:
echo "i equals 0";
break;
case 1:
echo "i equals 1";
break;
case 2:
echo "i equals 2";
break;
}
all 3 cases fire, even though $i only eq
Jochem Maas wrote:
>figures, no blooming good to us then :-)
No, I wouldn't bother! (It actually p!sses me off when I have to type my
email address into a form because they've decided to pick some unique
name for the field!)
>makes me think of another trick to block spam/cruft/etc from
>form sub
Govinda a écrit :
does "top post" mean to puts one's reply text at the top of the email?
People prefer it to be at the bottom?
Yes, because the regular way is to read top to bottom.
Personally I like the new text to be at the top so I don't have to
scroll down to see the new part
You
Govinda a écrit :
Or is there a better reason?
What is exactly in $i ? A scalar integer, a string containing an
integer ? A boolean ? What version of PHP ?
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
Ross McKay schreef:
Jochem Maas wrote:
any idea as to whether auto-fill can recognize stuff like:
foo[email] or email[foo] or email_foo
[...]
AFAIK, the auto-fill form stuff works off previously entered field
names. If a user enters their email address into a field called 'email'
on
Michael S. Dunsavage schreef:
This is my date array:
$months = array (1 => 'January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November',
'December');
you want, if you ask me, to get you head round the following functions.
http://php.net/set_loca
Jochem Maas wrote:
>any idea as to whether auto-fill can recognize stuff like:
>
> foo[email] or email[foo] or email_foo
>[...]
AFAIK, the auto-fill form stuff works off previously entered field
names. If a user enters their email address into a field called 'email'
on one site, then anothe
Govinda schreef:
On Aug 31, 2008, at 2:17 PM, Jochem Maas wrote:
another tip: don't top post :-)
does "top post" mean to puts one's reply text at the top of the email?
exactly.
People prefer it to be at the bottom?
generally yes, the longer you hang around on mailing list and the like,
Ross McKay schreef:
On Sun, 31 Aug 2008 18:49:15 +0100, Stut wrote:
Field names
Don't name fields things like name, email, address, postcode, message,
etc. Instead name them a, b, c, d, e, etc but name your hidden field
email. That should provoke most bots into changing that value and
lea
On Mon, Sep 1, 2008 at 12:43 AM, Govinda <[EMAIL PROTECTED]>
wrote:
> On Aug 31, 2008, at 2:17 PM, Jochem Maas wrote:
>>
>> another tip: don't top post :-)
>
> does "top post" mean to puts one's reply text at the top of the email?
> People prefer it to be at the bottom?
> Personally I like the new
I would suggest the time() value to be saved in your database. Since
the date() function can use that as the second parameter and you can
use any format date() allows. Or make your own.
Ólafur Waage
[EMAIL PROTECTED]
2008/8/31 Michael S. Dunsavage <[EMAIL PROTECTED]>:
> This is my date array:
>
>
This is my date array:
$months = array (1 => 'January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November',
'December');
This is my date select in the form:
echo '';
for ($day = 1; $day <= 31; $day++) {
echo "$day\n";
}
echo '';
echo '';
On Aug 31, 2008, at 2:17 PM, Jochem Maas wrote:
another tip: don't top post :-)
does "top post" mean to puts one's reply text at the top of the
email? People prefer it to be at the bottom?
Personally I like the new text to be at the top so I don't have to
scroll down to see the new part,
On Sun, 31 Aug 2008 18:49:15 +0100, Stut wrote:
>Field names
>Don't name fields things like name, email, address, postcode, message,
>etc. Instead name them a, b, c, d, e, etc but name your hidden field
>email. That should provoke most bots into changing that value and
>leaves others unsure
On Sun, 31 Aug 2008 13:25:52 -0400, Eric Butera wrote:
>[...]
>Honey Pots
>This is a two step process. First I have a hidden form field that has
>a specific value in it. If this value is tampered with, then I reject
>the form. The second form field is inside of an html comment. If
>that value
Robert Cummings schreef:
On Sun, 2008-08-31 at 16:25 -0400, Robert Cummings wrote:
On Sun, 2008-08-31 at 22:21 +0200, Jochem Maas wrote:
Robert Cummings schreef:
On Sun, 2008-08-31 at 21:42 +0200, Jochem Maas wrote:
Robert Cummings schreef:
I assume that this is coming from your inter
Dan Shirah schreef:
Hello,
I'm hoping to get a few good ideas on the best way to perform a search of
PHP results.
Currently I have a page that returns a list of collapsed customer data:
Example
+ John Smith
+ Jane Doe
+ Robert Jones
+ Dale Bennett
If the user clicks on a customer name it will
On 31 Aug 2008, at 22:17, Jochem Maas wrote:
Robert Cummings schreef:
On Sun, 2008-08-31 at 10:46 -0400, tedd wrote:
At 5:39 AM -0400 8/31/08, Robert Cummings wrote:
On Sat, 2008-08-30 at 10:17 -0400, tedd wrote:
At 3:27 PM +0200 8/30/08, Jochem Maas wrote:
>
>2. you can't shut him down eithe
Stut schreef:
Good points all, but I'd add two more from my own collection...
nice posts, both of you! it's time I rewrote my general form submission
routines ... I'll be taking all your suggestions and putting them into
practice (in so far as I don't do so already).
free specs for better code
Robert Cummings schreef:
On Sun, 2008-08-31 at 10:46 -0400, tedd wrote:
At 5:39 AM -0400 8/31/08, Robert Cummings wrote:
On Sat, 2008-08-30 at 10:17 -0400, tedd wrote:
At 3:27 PM +0200 8/30/08, Jochem Maas wrote:
>
>2. you can't shut him down either, he does'nt have an off button.
Yeah, h
tedd schreef:
At 10:58 AM +0100 8/31/08, Diogo Neves wrote:
Well, I don't know how, but google folks @ gmail are doing a great job
with anti-spam tecnology... i believe that is has something to do with
the massive user base that can more accuratly say what is spam and
blacklist it plus mispellin
On Sun, 2008-08-31 at 16:25 -0400, Robert Cummings wrote:
> On Sun, 2008-08-31 at 22:21 +0200, Jochem Maas wrote:
> > Robert Cummings schreef:
> > > On Sun, 2008-08-31 at 21:42 +0200, Jochem Maas wrote:
> > >> Robert Cummings schreef:
> >
> >
> >
> > >> I assume that this is coming from your
On Sun, 2008-08-31 at 22:21 +0200, Jochem Maas wrote:
> Robert Cummings schreef:
> > On Sun, 2008-08-31 at 21:42 +0200, Jochem Maas wrote:
> >> Robert Cummings schreef:
>
>
>
> >> I assume that this is coming from your interjinn lib, and that it's
> >> aimed at php4 (given the ampersands you
Robert Cummings schreef:
On Sun, 2008-08-31 at 21:42 +0200, Jochem Maas wrote:
Robert Cummings schreef:
I assume that this is coming from your interjinn lib, and that it's
aimed at php4 (given the ampersands your throwing about)
also your LockManager object seems to have a get() and ge
Diogo Neves schreef:
Newbie :(
another tip: don't top post :-)
that said don't feel bad, you make a lot more effort than most
noobs ... personally I wish every newcomer would be so open
to pointers/critism/tips/etc and made as much effort as you do,
this place would be better off.
so ... just
On Sun, 2008-08-31 at 21:42 +0200, Jochem Maas wrote:
> Robert Cummings schreef:
> > On Sun, 2008-08-31 at 17:10 +0200, Jochem Maas wrote:
> >> Robert Cummings schreef:
> >>> On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
> Robert Cummings wrote:
>
> >> That's easily taken care
I actually must say we have a special kind of output buffering that saves
all the content in an array like structure and outputs all content at the
end. This way we managed to have our coders work in a rather C/C++ like way,
where they can modify the rendered content anywhere in a script. The fact
On Sun, Aug 31, 2008 at 1:49 PM, Stut <[EMAIL PROTECTED]> wrote:
> Good points all, but I'd add two more from my own collection...
>
> Field names
> Don't name fields things like name, email, address, postcode, message, etc.
> Instead name them a, b, c, d, e, etc but name your hidden field email. T
Newbie :(
On Sun, Aug 31, 2008 at 8:37 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Diogo Neves schreef:
>>
>> Hi again,
>>
>> There's what you need ( I think )
>
> not so much that I need it, but the easier you make it
> for some one to look at your issue the more likely it is
> someone will. :-)
Robert Cummings schreef:
On Sun, 2008-08-31 at 17:10 +0200, Jochem Maas wrote:
Robert Cummings schreef:
On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
Robert Cummings wrote:
That's easily taken care of. Instead of a cron-job, you could have a
script running as a daemon, checking for e
Diogo Neves schreef:
Hi again,
There's what you need ( I think )
not so much that I need it, but the easier you make it
for some one to look at your issue the more likely it is
someone will. :-)
Simplified version for web:
http://pastebin.com/d2bfcf495
Simplified version for CLI:
http://pas
On Sun, 2008-08-31 at 18:49 +0100, Stut wrote:
> Good points all, but I'd add two more from my own collection...
>
> Field names
> Don't name fields things like name, email, address, postcode, message,
> etc. Instead name them a, b, c, d, e, etc but name your hidden field
> email. That should
Hi again,
There's what you need ( I think )
Simplified version for web:
http://pastebin.com/d2bfcf495
Simplified version for CLI:
http://pastebin.com/d6ab96ed0
On Sun, Aug 31, 2008 at 7:09 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Diogo Neves schreef:
>>
>> Sorry, i have no webserver... but I
Diogo Neves schreef:
Sorry, i have no webserver... but I can send all code in the email, right?
you can use pastebin.com.
I also recommend you write reproduce/example code like this for
the CLI so that other people don't have to go throught the hassle
of running via a webserver ( is not very
Good points all, but I'd add two more from my own collection...
Field names
Don't name fields things like name, email, address, postcode, message,
etc. Instead name them a, b, c, d, e, etc but name your hidden field
email. That should provoke most bots into changing that value and
leaves ot
Sorry, i have no webserver... but I can send all code in the email, right?
' . 0 . '';
echo ' a --> ' . a . '';
echo ' (string)a --> ' . (string)a . '';
global $b;
echo ' b --> ' . $b . '';
echo ' c --> ' . $this->c . '';
$d = 0;
echo ' d -->
I guess I'll chime in with my experience on this problem. For the
past 2 years I've been using a form processor script I wrote on all
the client sites for my company. I developed it at first to handle a
simple set of functionality that hit 90% of the requirements of
contact forms. It can handle
On Sun, 2008-08-31 at 17:10 +0200, Jochem Maas wrote:
> Robert Cummings schreef:
> > On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
> >> Robert Cummings wrote:
> >>
> That's easily taken care of. Instead of a cron-job, you could have a
> script running as a daemon, checking for ema
On Sun, 2008-08-31 at 17:09 +0200, Jochem Maas wrote:
> Diogo Neves schreef:
> > Hi all,
> >
> > Why a static var don't cast as a dynamic one?
> > See file for more info...
>
> attachments get stripped.
> don't cross post to internals, it's bad form.
> try and formulate your questions a bit bette
On Sun, 2008-08-31 at 10:46 -0400, tedd wrote:
> At 5:39 AM -0400 8/31/08, Robert Cummings wrote:
> >On Sat, 2008-08-30 at 10:17 -0400, tedd wrote:
> >> At 3:27 PM +0200 8/30/08, Jochem Maas wrote:
> >> >
> >> >2. you can't shut him down either, he does'nt have an off button.
> >>
> >> Yeah, he
tedd wrote:
>
>
> What you see above and what you claim to be
> "reality" is actually PUNYCODE -- that is NOT
> what the url actually is.
Hmm, the URL that is presented to the webserver is certainly in
punycode - what the user sees depends on the browser.
In my opinion they're both URLs, just
Robert Cummings schreef:
On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
Robert Cummings wrote:
That's easily taken care of. Instead of a cron-job, you could have a
script running as a daemon, checking for emails to be sent every
5mins.
That's the same as running a cron every 5 minutes
Diogo Neves schreef:
Hi all,
Why a static var don't cast as a dynamic one?
See file for more info...
attachments get stripped.
don't cross post to internals, it's bad form.
try and formulate your questions a bit better
(it should take you more time to write your post than
it takes for someone
At 10:58 AM +0100 8/31/08, Diogo Neves wrote:
Well, I don't know how, but google folks @ gmail are doing a great job
with anti-spam tecnology... i believe that is has something to do with
the massive user base that can more accuratly say what is spam and
blacklist it plus mispelling 'spam' words
At 5:39 AM -0400 8/31/08, Robert Cummings wrote:
On Sat, 2008-08-30 at 10:17 -0400, tedd wrote:
At 3:27 PM +0200 8/30/08, Jochem Maas wrote:
>
>2. you can't shut him down either, he does'nt have an off button.
Yeah, he's a lot like his blow-up dolls except you can't deflate him. :-)
WHOO
At 5:35 AM -0400 8/31/08, Robert Cummings wrote:
and we may end up employing full on measures of the likes
of spamassasin once CAPTCHA becomes more weak to automated attacks.
Cheers,
Rob.
Agreed -- that's where I think this is all going.
The CAPTCHA solution is not THE solution and it's eff
At 9:52 AM +0300 8/31/08, Sancar Saran wrote:
http://blogs.zdnet.com/security/?p=1835
That was great.
Human captcha resolvers.
$2 per 1000 resloved captchas...
ouch...
At least I know where I can find work. :-)
Just an example of how the human element can out-smart itself.
Cheers,
ted
At 8:37 PM +0100 8/30/08, Diogo Neves wrote:
Well, i really really believe that urls should keep clear as water...
http://forcaaerea.pt should exist, and not http://forçaaérea.pt...
even because in reality its http://xn--foraarea-u0aw.pt
Its a big mess...
How to keep it clear? don't mess up wi
At 3:22 PM -0400 8/30/08, Andrew Ballard wrote:
I was only contrasting tedd's current suggestion regarding how
browsers could handle his Unicode domain names where he suggested
color-coding the URL in the address bar against his earlier (well
thought out and presented) concerns about maintaining
At 2:21 PM -0400 8/30/08, Andrew Ballard wrote:
On Sat, Aug 30, 2008 at 11:38 AM, tedd <[EMAIL PROTECTED]> wrote:
> I think making the URL RED would be a better warning than showing PUNYCODE
-- but that's my opinion.
Cheers,
tedd
Wait a minute - you're going to rail on for ever on anothe
Hi all,
Why a static var don't cast as a dynamic one?
See file for more info...
--
Thanks for your attention,
Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Maybe a protocol of SPAM notifications can do da trick...
Something like a system, more or less central that smtp server should
use to exchange information about SPAM, like that u get not only the
gmail base, but a yet bigger set off it... that whould do the trick,
and possible take the internet ro
On Sun, 2008-08-31 at 12:49 +0200, Per Jessen wrote:
> Robert Cummings wrote:
>
> > On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
> >> Robert Cummings wrote:
> >>
> >> >> That's easily taken care of. Instead of a cron-job, you could
> >> >> have a script running as a daemon, checking for
Robert Cummings wrote:
> On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
>> Robert Cummings wrote:
>>
>> >> That's easily taken care of. Instead of a cron-job, you could
>> >> have a script running as a daemon, checking for emails to be sent
>> >> every 5mins.
>> >
>> > That's the same as
On Sun, 2008-08-31 at 10:58 +0100, Diogo Neves wrote:
> Well, I don't know how, but google folks @ gmail are doing a great job
> with anti-spam tecnology... i believe that is has something to do with
> the massive user base that can more accuratly say what is spam and
> blacklist it plus mispelling
On Sun, 2008-08-31 at 12:12 +0200, Per Jessen wrote:
> Robert Cummings wrote:
>
> >> That's easily taken care of. Instead of a cron-job, you could have a
> >> script running as a daemon, checking for emails to be sent every
> >> 5mins.
> >
> > That's the same as running a cron every 5 minutes ex
Robert Cummings wrote:
>> That's easily taken care of. Instead of a cron-job, you could have a
>> script running as a daemon, checking for emails to be sent every
>> 5mins.
>
> That's the same as running a cron every 5 minutes except now you also
> need to detect if your daemon dies :) On the pl
On Sun, 31 Aug 2008 05:35:42 -0400, Robert Cummings wrote:
>[...] As Stut has
>pointed out already, the best filter for spam I've encountered is to
>reject posts with links :/
This also is what works for me. However, this is for commercial
websites, not blogs / forums, so links are not expected i
Well, I don't know how, but google folks @ gmail are doing a great job
with anti-spam tecnology... i believe that is has something to do with
the massive user base that can more accuratly say what is spam and
blacklist it plus mispelling 'spam' words and the original ones, plus
that '1000's from th
On Sat, 2008-08-30 at 22:14 +0200, Per Jessen wrote:
> Merlin wrote:
>
> > I am thinking about placing the info on the individual e-mail inside a
> > ascii txt file that will be read by a cron job which will send the
> > e-mail instead. Something like every 5 minutes reading it line by line
> > an
On Sat, 2008-08-30 at 19:22 +0200, Jochem Maas wrote:
> tedd schreef:
> > At 3:25 PM +0100 8/30/08, Stut wrote:
> >> in the meantime I stand by my assertion that a 'phone number people
> >> can call with any type of telephone to interact with another human who
> >> can get them past the check wit
On Sat, 2008-08-30 at 10:17 -0400, tedd wrote:
> At 3:27 PM +0200 8/30/08, Jochem Maas wrote:
> >
> >2. you can't shut him down either, he does'nt have an off button.
>
> Yeah, he's a lot like his blow-up dolls except you can't deflate him. :-)
WHOOA... "my" blow-up dolls? Since when
On Sat, 2008-08-30 at 15:02 +0100, Stut wrote:
> On 30 Aug 2008, at 14:05, tedd wrote:
> > At 11:39 PM +0200 8/29/08, Jochem Maas wrote:
> >> I think both tedd and Stut make good points, I guess we'll all be
> >> hacking away at such issues for a long time to come.
> >
> > That's the nature of the
71 matches
Mail list logo