variable_array
PHP
<?php
//Array exemplo
$emails = [
'email1@alura.com',
'email2@alura.com',
'email3@alura.com',
];
foreach ( $emails as $index => $email ) {
[ $usuarios[$index], $dominios[$index] ] = explode( "@", $email );
}
print_r ( $usuarios );
print_r ( $dominios );
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.