1. Basically the title. I want the value of karma from the API to echo it.
    I'm a begginer in PHP so I'm still learning.
    This is the code.
    PHP:
    $json json_decode(file_get_contents("https://api.hypixel.net/player?key=apikey&name='$ign'"), true);
    $karma $json["player"]["path"]["to"]["karma"];
    If anyone could help I would really appreciete it! Reply if you need any further information.
    Thank you :)
     
    #1
  2. The path for a player's karma should be:
    PHP:
    $karma $json["player"]["karma"];
     
    #2
  3. It worked! Thank you so much for your help!!! :):)
     
    #3

Share This Page