PHP 8.5.0 Beta 1 available for testing

Voting

: five plus three?
(Example: nine)

The Note You're Voting On

knl at bitflop dot com
15 years ago
If you need to parse the data from SimpleXML into a session variable remember to define the data as a string first.

If you don't you will get warnings of "Node no longer exists" pointing to your session_start() function.

This will work:

<?php

$new_version
= simplexml_load_file('http://example.com/version.xml');
$_SESSION['current_version'] = (string)$new_version->version;

?>

<< Back to user notes page

To Top