Curso de PHP🐘 y MySql🐬 [35.- Arreglos part 1]
En este tutorial vamos a definir que es un arreglo y vamos a crear un ejemplo en codigo.
Codigo: https://github.com/programadornovato/php/commit/5434cb4c9e5ce865be88f5c702b24377c0d2cc82
<!doctype html> <html lang="en"> <head> <title>Tutorial Array</title> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> </head> <body> <?php /* //INDICE INDEXADO $autos[]="Roadster"; $autos[]="Model X"; $autos[]="Model S"; $autos[]="Cybertruck"; echo $autos[0]; */ /* //INDICE ASOCIATIVO $autos["Roadster"]=50; $autos["Model X"]=40; $autos["Model S"]=20; $autos["Cyberruck"]=80; echo $autos["Cyberruck"]; */ /* //INDICE INDEXADO $autos=array( "Roadster", "Model X", "Model S", "Cyberruck" ); echo $autos[2]; */ //INDICE ASOCIATIVO $autos=array( "Roadster"=>50, "Model X"=>40, "Model S"=>20, "Cyberruck"=>80 ); echo $autos["Cyberruck"]; ?> </body> </html>
? Esta lista de reproducción: https://www.youtube.com/playlist?list=PLCTD_CpMeEKS2Dvb-WNrAuDAXObB8GzJ0
Codigos en gdrive: https://drive.google.com/file/d/1tQwYvfL2jiUFc6beTWkOkGmXkq5zzFw2/view?usp=sharing
Gracias por apoyar este canal: https://www.patreon.com/programadornovato?fan_landing=true
? Facebook: https://facebook.com/ProgramadorNovatoOficial
? Twitter: https://twitter.com/programadornova
? Linkedin: https://www.linkedin.com/in/programadornovato/
? Instagram: https://www.instagram.com/programadornovato/