Created
September 6, 2019 21:41
-
-
Save parzibyte/c72f4bbe043985579f4494388aa138d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Definimos variables del perfil, obviamente | |
// estas deberían de venir de una base de datos o de la sesión | |
$nombre = "Luis Cabrera"; | |
$apodo = "Parzibyte"; | |
$sitioWeb = "https://parzibyte.me/blog"; | |
// Preparar el objeto que vamos a mostrar | |
$datos = [ | |
"nombre" => $nombre, | |
"apodo" => $apodo, | |
"sitioWeb" => $sitioWeb, | |
]; | |
// Mostrar codificadas como JSON | |
echo json_encode($datos); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment