Skip to content

Instantly share code, notes, and snippets.

@chateaux
Created October 27, 2016 12:25
Show Gist options
  • Save chateaux/f2b14a10e76029031125f17d96d80f40 to your computer and use it in GitHub Desktop.
Save chateaux/f2b14a10e76029031125f17d96d80f40 to your computer and use it in GitHub Desktop.
<div class="container">
<div class="featurette" id="contact">
<h2 class="featurette-heading">Referrer
<span class="text-muted">data</span>
</h2>
<p class="lead">
As a marketer you will need to learn how to send data to our games, the following cookie data is associated to your account:
</p>
<p>
<table class="table">
<tr>
<td colspan="2"><b>Campaign Data:</b></td>
</tr>
<?php
$data = $this->CookieHelper('referrer');
if (!$data)
{
$data = [];
}
function recursiveArray($array)
{
foreach ($array AS $key => $item)
{
if (!is_array($item)) {
echo "<tr><td>".$key."</td><td>".$item."</td></tr>";
} else {
echo "<table class='table'><tr><th colspan='2'>".$key."</th></tr>";
recursiveArray($item);
echo "</table>";
}
}
}
recursiveArray($data);
?>
</table>
</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment