Array
<!DOCTYPE html>
<html>
<body>

<?php

$students_inf = array(
array(
	
        "Name" => 'Luka', 
	"Age" => 21,
	"E-mail" => 'Luka.N111@gmail.com',
	"Status" => 'Registered'

  ),    
	
     array(
	"Name" => 'Nini',	
	"Age" => 20,
	"E-mail" => 'Nini.K312@gmail.com',
	"Status" => 'Unregistered'
		
  ),
		
     array(
   	"Name" => 'Giorgi',
        "Age" => 22,
        "E-mail" => 'Giorgi.ES8@gmail.com',     
   	"Status" => "Registered"
   	
   	)
 );
  
 //You can get students information with echo and var_dump. 
 
 var_dump(json_encode($students_inf));
 
 echo str_repeat("<br />",5);
 
 
 echo $students_inf[0]['Name']. "<br />";
 echo $students_inf[0]['Age']. "<br />";
 echo $students_inf[1]['Status']. "<br />";  
 echo $students_inf[2]['E-mail']. "<br />"; 

  
 ?>

</body>
</html>
by ნუგო ყველაშვილი
2 years ago
PHP
php
array
0
Pro tip: use ```triple backticks around text``` to write in code fences