title: Create an array/collection/list of (Date,Value) in PHP
body: <p>I am writing a PHP script where the inputs are:</p>
  
  <pre><code>From date
  To date
  </code></pre>
  
  <p>I then want to take that date range and create an array of some sort that has:</p>
  
  <pre><code>Array(date,x)
  </code></pre>
  
  <p>As I add each date to the array, I will calculate the value that goes with it.</p>
  
  <p>With .NET I would (off the top of my head) use a dictionary where the date was the key and x is the value.</p>
  
  <p>The main task is getting that date range, then splitting that range into an array or dictionary of some sort (What would be ideal in php)</p>
  
  <p>As i'm adding it to the array i'll run off some other code i've already wrote that calculate the value to go with that date</p>
  
  <p>At the end of it all when it's added in there, i'll need to iterate through the array or list and add all the x values together.</p>