note 96652 added to language.types.array
| From: | sykboy at msn dot com | Date: | Tue, 09 Mar 2010 23:31:58 +0000 |
| Subject: | note 96652 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166851@lists.php.net to get a copy of this message | ||
<?php
$cupboard = array();
$cupboard['books'] = array(
'Pawn of Prephecy (1982)',
'Queen of Sorcery (1982)',
'Magicians\'s Gambit (1983)',
'Castle of Wizardry (1984)',
'Enchanters\' End Game (1984)');
$cupboard['dvds'] = array();
$cupboard['dvds']['box_sets'] - array(
'Fireflies Box Set',
'Robot Chicken Season 1',
'Red Dwarf Season 1',
'True Blood Season 1');
$cupboard['dvds]['movies'] = array( //Array within an array within an array
'The Hangover',
'Couples Retreat');
$cupboard['odds'] = array('Converse Shoe', 'Motherboard',
'Monopoly');
echo"<h2>Too hard to read</h2><br>";
echo '<pre>';
[rint_r($cupboard);
echo '</pre>';
?>
Something you may have notices is the /' characters occassionaly. Why do you think this is?
<?php
'Magician\'s Gambit (1983)',
?>
We call this in escape character (\). Its telling PHP to ignore the single quote. If not we'd
probably get an error because its not closing at Magician'. remember this it'll save your
life.
<pre></pre> Tags allow you to view arrays in a more meaningful way.
----
Server IP: 117.104.162.229
Probable Submitter: 153.107.33.154 (proxied: 153.107.33.154)
----
Manual Page -- http://www.php.net/manual/en/language.types.array.php
Edit -- https://master.php.net/note/edit/96652
Del: integrated -- https://master.php.net/note/delete/96652/integrated
Del: useless -- https://master.php.net/note/delete/96652/useless
Del: bad code -- https://master.php.net/note/delete/96652/bad+code
Del: spam -- https://master.php.net/note/delete/96652/spam
Del: non-english -- https://master.php.net/note/delete/96652/non-english
Del: in docs -- https://master.php.net/note/delete/96652/in+docs
Del: other reasons-- https://master.php.net/note/delete/96652
Reject -- https://master.php.net/note/reject/96652
Search -- https://master.php.net/manage/user-notes.php