When i search a Tv with query: https://api.themoviedb.org/3/search/tv?page=1&query=Malcolm%20In%20The%20Middle&language=fr&api_key=XXXXXXX, i want just the name of the serie but i don't know how do this, bceause the "results" is a json array. Help me please.
Sorry my langage is french and not english
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Travis Bell
le 12 décembre 2016 à 11h41
Hi @XPheNiiXz You'll have to iterate over the array. Every language is going to be slightly different, but it's just an array so it's as easy as iterating over it and doing what you want with each object. Here's a simple print:
Réponse de XPheNiiXz
le 13 décembre 2016 à 02h12
Thank you for your reply @travisbell . How can I do in php ? :)
Réponse de XPheNiiXz
le 13 décembre 2016 à 08h48
Because my json is:
And i just want the original name or the poster path, but i can't :(
I can have the page but not any item in the results
Réponse de XPheNiiXz
le 13 décembre 2016 à 09h31
I have an aray too:
Réponse de Travis Bell
le 13 décembre 2016 à 10h09
Unfortunately, I can't answer your question about PHP as I have never used it.
Best thing I can suggest is taking a look at one of the PHP libraries and either use one, or at the very least look at how some of the responses are handled in PHP.
Cheers.
Réponse de XPheNiiXz
le 13 décembre 2016 à 10h18
Thanks i will look at
Réponse de XPheNiiXz
le 14 décembre 2016 à 05h25
I find how do this.
Thank you.