Question
I'm trying to run a code using php and json but I am getting a warning of an invalid argument. Please help movies.php movies.json {
I'm trying to run a code using php and json but I am getting a warning of an invalid argument. Please help
movies.php
"; foreach($json['movies'] as $movie){ $output .="
".$movie['title']."
"; $output .="
movies.json
{ "movies": [ { "title": "The Notebook", "year": "2004", "genre": "Romance", "director": "Nick Cassavetes" }, { "title": "Footloose", "year": "1984", "genre": "Drama", "director": "Herbert Ross" }, { "title": "The Green Mile", "year": "1999", "genre": "Drama", "director": "Steven King" }, { "title": "Friday The 13th", "year": "1980", "genre": "Horror", "director": "Sean Cunningham" } ]
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started