how to load JSON from a file in PHP

how to load JSON from a file in PHP

In this post i will describe to the users, how to load a JSON from the file in PHP. many a times coder need to access the json file as input data.
i am showing, how to load a json from a file and converted into the array or object in php.

if we read a json file as string then no need to converting into the array or object in php.
here i am using the file_get_contents function to achieve the target result.