note 96652 deleted from language.types.array by danbrown

From: Date: Wed, 10 Mar 2010 18:10:42 +0000
Subject: note 96652 deleted from language.types.array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166878@lists.php.net to get a copy of this message
Note Submitter: sykboy at msn dot com ---- <?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.

« previous php.notes (#166878) next »