Crear array

Podem crear un array de la següent manera:

<?
$ciutats = array(
0=>”lleida”,
1=>”barcelona”,
2=>”girona”);
?>

i fegir-ne més tard altres valors:

<?
$ciutats[3] = “tarragona”;
?>

Deixa un comentari

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Canvia )

Twitter picture

You are commenting using your Twitter account. Log Out / Canvia )

Facebook photo

You are commenting using your Facebook account. Log Out / Canvia )

Connecting to %s


Follow

Get every new post delivered to your Inbox.