title: How do I get the data from a particular row of JSON data using PHP?
body: <p>I have a JSON data file that looks like this:</p>
  
  <pre><code>    {
      "aaData": [
  ["1","&lt;a href=\"ra-no-1.php\"&gt;An Act Appropriating Funds for the Operation of the Government of the Commonwealth of the Philippines Beginning July First, Nineteen Hundred and Forty-Six Until the General Appropriations Act for the Fiscal Year Nineteen Hundred and Forty-Seven is Approved&lt;/a&gt;","1946-07-15"],
  ["2","&lt;a href=\"ra-no-2.php\"&gt;An Act Appropriating Fifty Thousand Pesos to Defray the Expenses of a State Funeral for Manuel L. Quezon and for the Erection of a Mausoleum to Contain His Remains&lt;/a&gt;","1946-07-19"],
  ["3","&lt;a href=\"ra-no-3.php\"&gt;An Act to Continue in Force and Effect the Act of the Congress of the United States, Approved on August 5, 1909, Entitled “An Act to Raise Revenue for the Philippine Islands, and for Other Purposes,” Otherwise Known as “The Philippine Tariff Law of 1909,” as Amended&lt;/a&gt;","1946-07-19"],
  ["4","&lt;a href=\"ra-no-4.php\"&gt;An Act to Amend Section Twenty-Six Hundred and Ninety-Two of the Revised Administrative Code, and to Exempt from Responsibility Those Who Should Surrender Firearms Under Certain Conditions, and for Other Purposes&lt;/a&gt;","1946-07-19"],
  ["5","&lt;a href=\"ra-no-5.php\"&gt;An Act to Amend Sections Two and Five of Commonwealth Act Numbered Five Hundred Eighteen, Entitled “An Act to Establish the National Coconut Corporation, and to Appropriate Additional Operating Capital for Said Corporation”&lt;/a&gt;","1946-08-01"],
  ["6","&lt;a href=\"ra-no-6.php\"&gt;An Act to Provide That as of the Date of the Proclamation of the Republic of the Philippines the Present Congress of the Philippines Shall be Known as the First Congress of the Republic of the Philippines, and for Other Purposes&lt;/a&gt;","1946-08-05"],
  ["7","&lt;a href=\"ra-no-7.php\"&gt;An Act to Establish the Foreign Funds Control Office, and for Other Purposes&lt;/a&gt;","1946-08-09"],
  ["8","&lt;a href=\"ra-no-8.php\"&gt;An Act to Authorize the President of the Philippines to Enter Into Such Contracts or Undertakings as May be Necessary to Effectuate the Transfer to the Republic of the Philippines Under the Philippine Property Act of Nineteen Hundred and Forty-Six of Any Property or Property Rights or the Proceeds Thereof Authorized to be Transferred Under Said Act; Providing for the Administration and Disposition of Such Properties Once Received; and Appropriating the Necessary Funds Therefore&lt;/a&gt;","1946-08-09"],
  ["9","&lt;a href=\"ra-no-9.php\"&gt;An Act to Authorize the President of the Philippines to Enter Into an Agreement or Agreements with the Government of the United States Pursuant to United States Public Act Numbered Four Hundred and Fifty-Four, Commonly Called the “Republic of the Philippines Military Assistance Act,” and to Issue the Necessary Rules and Regulations to Implement Said Act, and Providing Penalties for Violations Thereof&lt;/a&gt;","1946-09-02"],
  ["10","&lt;a href=\"ra-no-10.php\"&gt;An Act Penalizing Usurpation of Public Authority&lt;/a&gt;","1946-09-02"],
  ["11","&lt;a href=\"ra-no-11.php\"&gt;An Act to Prohibit the Slaughtering of Male and Female Carabaos, Horses, Mares, and Cows&lt;/a&gt;","1946-09-02"],
  ["12","&lt;a href=\"ra-no-12.php\"&gt;An Act Amending Articles One Hundred Forty-Six, Two Hundred Ninety-Five, Two Hundred Ninety-Six and Three Hundred Six of the Revised Penal Code&lt;/a&gt;","1946-09-05"],
  ["13","&lt;a href=\"ra-no-13.php\"&gt;An Act to Amend Sections Five and Six of Commonwealth Act Numbered Six Hundred and Seventy-Two, Entitled “An Act to Rehabilitate the Philippine National Bank”&lt;/a&gt;","1946-09-05"]
      ]
  }
  </code></pre>
  
  <p>I'm trying to create a standard way to get data from the file just by specifying a particular line and mapping the row data into particular variables. I imagine that there's a way to do this using by converting the JSON into an array but I'm finding it difficult to understand how to select a particular row and then mapping the row's data into variables.</p>
  
  <p>Ultimately, I want to call this function from another PHP file via includes and echoing/printing the result. I think my code would look like this:</p>
  
  <pre><code>&lt;?php echo '&lt;a href="' . $link . '" ' . 'title="' . $title . '"&gt;' ?&gt;
  </code></pre>
  
  <p>and my data would be mapped as follows:</p>
  
  <pre><code>col1 =&gt; row specifier
  col2 =&gt; link
  col3 =&gt; title
  </code></pre>
  
  <p>I hope I've explained my question properly. I'm not particularly well-versed in the proper vocabulary to explain this problem. Thanks in advance! :)</p>