wddx_deserialize function demo : wddx_deserialize « Network « PHP






wddx_deserialize function demo

 
<?php
$fp = fopen ( "http://localhost/remote.php", "rt" );
if ($fp) {
  $wddx = "";
  while ( ! feof ( $fp ) ) {
    $wddx .= fread ( $fp, 4096 );
  }
  fclose ( $fp );
  $wddx = wddx_deserialize ( $wddx );
  for($m = 0; $m < 12; $m ++) {
    printf ( "The sale in %s was %d\n", $wddx ['months'] [$m], $wddx ['sales'] [$m] );
  }
}
?>
  
  








Related examples in the same category