-1

Hi guys is there a way in php where in I can print this response prettier? For example, Print only the firstname, lastname, middlename of the response content.

Here's the response i got from the API enter image description here

I tried decoding the response with this code but still failed to get the key and values

    $students["mi"];
var_dump($students);

$s =  html_entity_decode($students);

Thank you so much for the help

tomerpacific
  • 3,871
  • 11
  • 28
  • 48
AmyllaVimiar
  • 285
  • 3
  • 21

1 Answers1

2

You could accessing the middlename of the firts row this way

$st = json_decode( $students);
$st[0]['middlename'];


var_dump( $st[0]['middlename']);
ScaisEdge
  • 129,293
  • 10
  • 87
  • 97