I have a JSON data file that looks like this:
{
"aaData": [
["1","<a href=\"ra-no-1.php\">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</a>","1946-07-15"],
["2","<a href=\"ra-no-2.php\">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</a>","1946-07-19"],
["3","<a href=\"ra-no-3.php\">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</a>","1946-07-19"],
["4","<a href=\"ra-no-4.php\">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</a>","1946-07-19"],
["5","<a href=\"ra-no-5.php\">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”</a>","1946-08-01"],
["6","<a href=\"ra-no-6.php\">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</a>","1946-08-05"],
["7","<a href=\"ra-no-7.php\">An Act to Establish the Foreign Funds Control Office, and for Other Purposes</a>","1946-08-09"],
["8","<a href=\"ra-no-8.php\">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</a>","1946-08-09"],
["9","<a href=\"ra-no-9.php\">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</a>","1946-09-02"],
["10","<a href=\"ra-no-10.php\">An Act Penalizing Usurpation of Public Authority</a>","1946-09-02"],
["11","<a href=\"ra-no-11.php\">An Act to Prohibit the Slaughtering of Male and Female Carabaos, Horses, Mares, and Cows</a>","1946-09-02"],
["12","<a href=\"ra-no-12.php\">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</a>","1946-09-05"],
["13","<a href=\"ra-no-13.php\">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”</a>","1946-09-05"]
]
}
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.
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:
<?php echo '<a href="' . $link . '" ' . 'title="' . $title . '">' ?>
and my data would be mapped as follows:
col1 => row specifier
col2 => link
col3 => title
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! :)