- Original Message
From: MEM tal...@gmail.com
To: Tommy Pham tommy...@yahoo.com; php-general@lists.php.net
Sent: Sat, October 10, 2009 2:49:23 AM
Subject: RE: [PHP] Newbie: Array of objects iteration
MEM,
http://www.php.net/language.oop5.reflection
Regards,
Tommy
MEM,
http://www.php.net/language.oop5.reflection
Regards,
Tommy
And brand new world opens in from of my eyes... O.O.
I will search more info on this on the net... just for the records, as
properties names is concern, I couldn't find any better I suppose:
2009/10/10 MEM tal...@gmail.com:
MEM,
http://www.php.net/language.oop5.reflection
Regards,
Tommy
And brand new world opens in from of my eyes... O.O.
I will search more info on this on the net... just for the records, as
properties names is concern, I couldn't find any better I
I think you are just looking for the key in the wrong place. Try:
foreach ( $records as $record ) {
foreach( $record as $column=$value ) {
echo $column is $value\n;
}
}
You've got the columns names in each record, not in the global recorset.
Good luck ;-)
Fernando Castillo Aparicio wrote:
I think you are just looking for the key in the wrong place. Try:
foreach ( $records as $record ) {
foreach( $record as $column=$value ) {
echo $column is $value\n;
}
}
You've got the columns names in each record, not in the global
07:23
To: php-general@lists.php.net
Subject: Re: [PHP] Newbie: Array of objects iteration
Fernando Castillo Aparicio wrote:
I think you are just looking for the key in the wrong place. Try:
foreach ( $records as $record ) {
foreach( $record as $column=$value ) {
echo
De: MEM tal...@gmail.com
Para: Lester Caine les...@lsces.co.uk; php-general@lists.php.net
Enviado: vie,9 octubre, 2009 12:40
Asunto: RE: [PHP] Newbie: Array of objects iteration
@LinuxManMikeC and all @All
Thanks. I was more or less aware of that possibility
Correct about my example, although I'm not sure if you get each record as
an array or as an object. Anyway, you can iterate both.
And if you want to get the column names, I suppose you could use
array_keys() on the first record if you receive an array, or maybe
get_object_vars() if it's an
Right now, I have something like this:
foreach ($objRecord as $record)
{
//we will have a new line.
$xls_file .=\n;
foreach ($record as $column=$value)
{
$xls_file .= $value.\t;
}
}
The only thing I need now, is to put on top, the
Dear all, it's done.
Can I call your help for the remain issues please, I'm sure they are easy to
explain, and at some extend, common:
http://pastebin.com/m691d3e66
Instead of saving to the database, if I do a print_r or a var_dump, I get
the charsets quite ok.
However, they do not appear
Done.
print utf8_decode($xls_file);
Regards,
Márcio
-Original Message-
From: MEM [mailto:tal...@gmail.com]
Sent: sexta-feira, 9 de Outubro de 2009 18:19
To: 'MEM'; 'Fernando Castillo Aparicio'; 'Lester Caine'; 'php-
gene...@lists.php.net'
Subject: RE: [PHP] Newbie: Array
- Original Message
From: MEM tal...@gmail.com
To: MEM tal...@gmail.com; Fernando Castillo Aparicio f_c_a_1...@yahoo.es;
Lester Caine les...@lsces.co.uk; php-general@lists.php.net
Sent: Fri, October 9, 2009 6:22:05 AM
Subject: RE: [PHP] Newbie: Array of objects iteration
Right
12 matches
Mail list logo