How to make this working. javascript should read the php value by return and disply it.
thank you,
<html>
<body>
<script type="text/javascript">
var _date = "<?=
$xml = new DOMDocument();
$xml->load( 'http://web.com/public.xml' );
$elements = $xml->getElementsByTagName( "data" );
$dates = $xml->getElementsByTagName( "i_data" );
$_date = $dates->item(0)->nodeValue;
return $_date;
?>";
alert(_date)
</script>
</body>
</html>