forked from tiamo/spss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrite12.php
More file actions
33 lines (29 loc) · 700 Bytes
/
Copy pathwrite12.php
File metadata and controls
33 lines (29 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* ISSUE: https://github.com/tiamo/spss/issues/12.
*/
require __DIR__ . '/../vendor/autoload.php';
$file = __DIR__ . '/data12.sav';
$writer = new \SPSS\Sav\Writer(array(
'header' => array(
'prodName' => '@(#) IBM SPSS STATISTICS',
'layoutCode' => 2,
'creationDate' => date('d M y'),
'creationTime' => date('H:i:s'),
),
'variables' => array(
array(
'name' => 'aaa',
'width' => 16,
'format' => 1,
),
array(
'name' => 'ccc',
'format' => 5,
'values' => array(
1 => 'Panel',
),
),
),
));
$writer->save($file);