PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am thoroughly confused. I'm also not used to dealing with objects. All of these code changes were due to having to change MS-SQL modules for FastCGI, but that's another story.
Secondly, commenting out that one line like you did will not have any affect on the next line of code. print_r only outputs data. It does not change any data contained in a variable.
"->" operator is used only for accessing memeber variables or functions in a class. So this is not the right use in your context and and will not work.
$objecttest is same as $row['Date'], so you can just use the following for printing it out -
internet-solution wrote:"->" operator is used only for accessing memeber variables or functions in a class. So this is not the right use in your context and and will not work.
$objecttest is same as $row['Date'], so you can just use the following for printing it out -
PHPHorizons wrote:
Secondly, commenting out that one line like you did will not have any affect on the next line of code. print_r only outputs data. It does not change any data contained in a variable.
Cheers
You saw the posted output, somehow it did. But again, it may be that I don't understand objects fully either.
It seems those properties (date, timezone_type and timezone) are created whenever the datetime object is interrogated for the list of it's properties. foreach(), property_exists(), print_r and Reflection::export() - all of those calls trigger property creation. Even array cast without saving the result triggers it:
Weirdan wrote:It seems those properties (date, timezone_type and timezone) are created whenever the datetime object is interrogated for the list of it's properties. foreach(), property_exists(), print_r and Reflection::export() - all of those calls trigger property creation. Even array cast without saving the result triggers it:
Weirdan wrote:It seems those properties (date, timezone_type and timezone) are created whenever the datetime object is interrogated for the list of it's properties. foreach(), property_exists(), print_r and Reflection::export() - all of those calls trigger property creation. Even array cast without saving the result triggers it:
LOL That's what I get for relying on the manual . Is that stated anywhere on the PHP site; because, I have not seen anything of the sort. Nor does the DateTime manual pages say there are date, timezone_type, and timezone properties (as far as I know)