The result of fann_create_train() is a "blank" or "empty" training data resource which can be saved to a file using fann_save_train().
<?php
$num_data = 4;
$num_input = 2;
$num_output = 1;
// Create an empty 'template' training resource in memory
$empty_training_resource = fann_create_train ($num_data , $num_input , $num_output);
// Save template.data
fann_save_train($empty_training_resource, 'template.data');
?>
File Saved (template.data):
4 2 1
0 0
0
0 0
0
0 0
0
0 0
0