php-general Digest 10 Sep 2011 08:35:37 -0000 Issue 7472

Topics (messages 314747 through 314767):

Re: array problem
        314747 by: Joshua Stoutenburg
        314748 by: Steve Staples
        314749 by: Adam Balogh
        314750 by: Ashley Sheridan

Repetitive answers . . .
        314751 by: Joshua Stoutenburg
        314752 by: Daniel Brown
        314753 by: Shawn McKenzie
        314754 by: Marc Guay
        314755 by: Joshua Stoutenburg
        314756 by: HallMarc Websites
        314757 by: Joshua Stoutenburg
        314758 by: Tedd Sperling
        314759 by: George Langley
        314760 by: Robert Cummings
        314761 by: Robert Cummings
        314762 by: Daniel Brown
        314763 by: Larry Martell
        314764 by: Tedd Sperling
        314765 by: George Langley
        314766 by: Lester Caine

PHP cron job optimization
        314767 by: muad shibani

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
The function fgetcsv() returns an array.

http://php.net/manual/en/function.fgetcsv.php


On Fri, Sep 9, 2011 at 9:00 AM, Marc Fromm <marc.fr...@wwu.edu> wrote:

> I am reading a csv file into an array. The csv file.
>
> users.csv file contents:
> w12345678,a
> w23456789,b
> w34567890,c
>
>                                $csvfilename = "users.csv";
> $handle = fopen($csvfilename, "r");
>                                if($handle) {
>                                                while (($line =
> fgetcsv($handle, 1000, ",")) !== FALSE) {
>                                                                $arrUsers[]
> = $line;
>                                                }
>                                                fclose($handle);
>                                }
>
> When I echo out the elements in the elements in the array $arrUsers I get:
> Array
> Array
> Array
>
> foreach ($arrUsers as $user){
>                echo $user . "<br />";
> }
>
> I can't figure out why the word Array is replacing the actual data.
>
>

--- End Message ---
--- Begin Message ---
On Fri, 2011-09-09 at 16:00 +0000, Marc Fromm wrote:
> I am reading a csv file into an array. The csv file.
> 
> users.csv file contents:
> w12345678,a
> w23456789,b
> w34567890,c
> 
>                                 $csvfilename = "users.csv";
> $handle = fopen($csvfilename, "r");
>                                 if($handle) {
>                                                 while (($line = 
> fgetcsv($handle, 1000, ",")) !== FALSE) {
>                                                                 $arrUsers[] = 
> $line;
>                                                 }
>                                                 fclose($handle);
>                                 }
> 
> When I echo out the elements in the elements in the array $arrUsers I get:
> Array
> Array
> Array
> 
> foreach ($arrUsers as $user){
>                 echo $user . "<br />";
> }
> 
> I can't figure out why the word Array is replacing the actual data.
> 

Try print_r($arrUsers);

also, the $line is an array of the CSV, so you're storing an array,
within the array $arrUsers.

foreach ($arrUsers as $user){
        foreach ($user as $val) {
                echo $val . "<br />";
        }
        echo '<hr />';
}


-- 

Steve Staples
Web Application Developer
519.258.2333 x8414


--- End Message ---
--- Begin Message ---
hi,

try to use print_r or var_dump to echo compound data type

--- End Message ---
--- Begin Message ---
You are echoing out an array. If you use something like print_r() or var_dump() 
you will see the array elements
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Marc Fromm <marc.fr...@wwu.edu> wrote:

I am reading a csv file into an array. The csv file.

users.csv file contents:
w12345678,a
w23456789,b
w34567890,c

$csvfilename = "users.csv";
$handle = fopen($csvfilename, "r");
if($handle) {
while (($line = fgetcsv($handle, 1000, ",")) !== FALSE) {
$arrUsers[] = $line;
}
fclose($handle);
}

When I echo out the elements in the elements in the array $arrUsers I get:
Array
Array
Array

foreach ($arrUsers as $user){
echo $user . "<br />";
}

I can't figure out why the word Array is replacing the actual data.


--- End Message ---
--- Begin Message ---
I'm new to this email list . . .

But is it customary to answer a question after it's already been adequately
answered?

Not trying to step on any toes.  I just think if I were asking the question,
it would be unpleasant to continue receiving answers, especially the same
answer, after receiving one that is prompt, accurate, precise, concise, and
adequate.

Likewise, if I had answered the question -- promptly, accurately, precisely,
concisely, adequately -- I would find it equally, if not more, unpleasant to
see my answer displaced, or buried, by a wash of similar answers.

Of course, it's always good to confirm things.  But can't the absence of
objection serve as confirmation?

Does anybody feel the same way?


NOTE:  There could be lag caused by network and server technologies.
Perhaps answers arrive during the time it takes a person to prepare an
answer.  These are forgivable.

--- End Message ---
--- Begin Message ---
On Fri, Sep 9, 2011 at 13:04, Joshua Stoutenburg <jehoshu...@gmail.com> wrote:
> I'm new to this email list . . .
>
> But is it customary to answer a question after it's already been adequately
> answered?
[snip!]

> NOTE:  There could be lag caused by network and server technologies.
> Perhaps answers arrive during the time it takes a person to prepare an
> answer.  These are forgivable.

    This is the reason, same as on any other public mailing list.
Better to receive too many responses than not enough.  Besides, more
often than not, it's multiple methods of doing things, not always
identical.  Not only will that never change, but it shouldn't.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On 09/09/2011 12:04 PM, Joshua Stoutenburg wrote:
> NOTE:  There could be lag caused by network and server technologies.
> Perhaps answers arrive during the time it takes a person to prepare an
> answer.  These are forgivable.

 This is the reason, same as on any other public mailing list.
Better to receive too many responses than not enough.  Besides, more
often than not, it's multiple methods of doing things, not always
identical.  Not only will that never change, but it shouldn't.


-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
That low-hanging fruit is too hard for some to resist...

--- End Message ---
--- Begin Message ---
I guess so.


On Fri, Sep 9, 2011 at 10:34 AM, Marc Guay <marc.g...@gmail.com> wrote:

> That low-hanging fruit is too hard for some to resist...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
PS Top posting is frowned upon on this list for reasons regarding how the
information is parsed to the online archive. Not a reprimand, just a FYI


--- End Message ---
--- Begin Message ---
Is there a way to reconfigure gmail settings to prevent this?

--- End Message ---
--- Begin Message ---
On Sep 9, 2011, at 1:30 PM, Shawn McKenzie wrote:

> On 09/09/2011 12:04 PM, Joshua Stoutenburg wrote:
>> NOTE:  There could be lag caused by network and server technologies.
>> Perhaps answers arrive during the time it takes a person to prepare an
>> answer.  These are forgivable.
> 
> This is the reason, same as on any other public mailing list.
> Better to receive too many responses than not enough.  Besides, more
> often than not, it's multiple methods of doing things, not always
> identical.  Not only will that never change, but it shouldn't.
> 
> -- 
> Thanks!
> -Shawn

Shawn:

Okay, you got me -- I was reading this and thought "What? Didn't I just read 
this?"

Then I got the joke -- low hanging fruit indeed.

Cheers,

tedd

_____________________
t...@sperling.com
http://sperling.com

--- End Message ---
--- Begin Message ---
On 2011-09-09, at 11:34 AM, Marc Guay wrote:

> That low-hanging fruit is too hard for some to resist...
-----------
        Phishing is a art.

George


--- End Message ---
--- Begin Message ---
On 11-09-09 02:19 PM, Joshua Stoutenburg wrote:
Is there a way to reconfigure gmail settings to prevent this?

Yes, just filter all PHP mail to junk. But in all reality, I can't imagine an email filter, short of genius AI, that could determine that one message was the best answer and then automatically remove all others that follow.

Cheers,
Rob
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
On 11-09-09 02:24 PM, George Langley wrote:
On 2011-09-09, at 11:34 AM, Marc Guay wrote:

That low-hanging fruit is too hard for some to resist...
-----------
        Phishing is a art.

Did anyone notice it's Friday?

Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
On Fri, Sep 9, 2011 at 14:30, Robert Cummings <rob...@interjinn.com> wrote:
>
> Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI

    I didn't know it was possible to fill almost four minutes with a
single note, outside of a test pattern.  That's got to be the worst
"singer" I've ever heard in my entire life.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On Fri, Sep 9, 2011 at 12:36 PM, Daniel Brown <danbr...@php.net> wrote:
> On Fri, Sep 9, 2011 at 14:30, Robert Cummings <rob...@interjinn.com> wrote:
>>
>> Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI
>
>    I didn't know it was possible to fill almost four minutes with a
> single note, outside of a test pattern.  That's got to be the worst
> "singer" I've ever heard in my entire life.

I agree, I only lasted 1 minute.

--- End Message ---
--- Begin Message ---
On Sep 9, 2011, at 2:36 PM, Daniel Brown wrote:
> On Fri, Sep 9, 2011 at 14:30, Robert Cummings <rob...@interjinn.com> wrote:
>> 
>> Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI
> 
>    I didn't know it was possible to fill almost four minutes with a
> single note, outside of a test pattern.  That's got to be the worst
> "singer" I've ever heard in my entire life.
> 
> -- 
> </Daniel P. Brown>
> Network Infrastructure Manager
> http://www.php.net/

What?!?

You're too old.

Cheers,

tedd

_____________________
t...@sperling.com
http://sperling.com

--- End Message ---
--- Begin Message ---
On 2011-09-09, at 12:39 PM, Larry Martell wrote:

> On Fri, Sep 9, 2011 at 12:36 PM, Daniel Brown <danbr...@php.net> wrote:
>> On Fri, Sep 9, 2011 at 14:30, Robert Cummings <rob...@interjinn.com> wrote:
>>> 
>>> Oblig: http://www.youtube.com/watch?v=sUntx0pe_qI
>> 
>>    I didn't know it was possible to fill almost four minutes with a
>> single note, outside of a test pattern.  That's got to be the worst
>> "singer" I've ever heard in my entire life.
> 
> I agree, I only lasted 1 minute.
------------
        Oh, so you didn't see the (as my kids like to say) "totally random" 
30-something-year-old male rapper suddenly appearing in a 14-year-old girl's 
video about partying like she's an adult? Something very wrong with a who that 
pays to get her daughter into a video like that...
        But thanks for reminding me that it is Friday. They all blend together 
when you're between jobs... And now, back to the job search


George Langley
Interactive Developer


--- End Message ---
--- Begin Message ---
Joshua Stoutenburg wrote:
Is there a way to reconfigure gmail settings to prevent this?

This is a long standing irritation for many of us ;)
I believe that most clients do have a setting to 'start message after quoting'
One of the other suggestions has been simply to switch off quoting altogether.

The main annoyance is when someone adds a 'me to' to the top of several pages of duplicate advertising and sigs - need I say more ;)

As for duplicate answers, another point to make is that often three or four people will all answer quite quickly, and so have not seen the others message. At times there can be a reasonable delay before messages get delivered and returned. My own local email server only pulls down every 10 minutes ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
I want to design an application that reads news from RSS sources.
I have about 1000 RSS feed to collect from.

I also will use Cron jobs every 15 minutes to collect the data.
the question is: Is there a clever way to collect all those feed items
without exhausting the server
any Ideas
Thank you in advance

--- End Message ---

Reply via email to