I have a page where I output some data (page1.php). Also I have another page (page2.php) where I need to pass the values as well.
// page1.php
$myVals = '""';
foreach($values as $name) {
$myVals .= ',"'.( strlen($name) ? htmlspecialchars($name) : ' ').'"';
}
$_SESSION['myVals'] = $myVals;
On page2.php I need myVals to be placed into the following string:
$xls->addRow(Array("First Name","Last Name","Website","ID"));
There are supposed to be separate values for xls file headers. Currently if I put my string in it, it is interpreted as a single value.
$xls->addRow(Array($_SESSION['myVals']));
What am I missing?
Why not store it as an array in page1?
Page1:
Page2: