How can I access .json data in PHP?
<p>I have a .json file. I want to access this data in my .php file. I have a variable $spellId, for example: $spellId="SummonerBarrier";</p>

<p>I want to get "name" from the .json file just by having $spellId.
Any idea how I can do this?</p>

<p>I know there are a lot of questions like this here, but i do not how to make the solutions with my code.</p>

<pre><code>{
    "type": "summoner",
    "version": "6.3.1",
    "data": {
        "SummonerBarrier": {
            "id": "SummonerBarrier",
            "name": "Barrier",
            "description": "Shields your champion for 115-455 (depending on champion level) for 2 seconds.",
            "tooltip": "Temporarily shields {{ f1 }} damage from your champion for 2 seconds.",
            "maxrank": 1,
            "cooldown": [
                210
            ]
        },
        "SummonerBoost": {
            "id": "SummonerBoost",
            "name": "Cleanse",
            "description": "Remove..."
        }
    }
}
</code></pre>