Re: Variable as an index

From: Date: Sun, 21 Dec 2008 22:04:05 +0000
Subject: Re: Variable as an index
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-284938@lists.php.net to get a copy of this message
Why is the first method faster and uses less memory? Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 22, 2008 at 10:59 AM, Marc Steinert <lists@bithub.net> wrote: > MikeP schrieb: > >> I have tried putting the quotes all over and all I get is: >> 'Array[U]'. >> >> >> > Try to avoid accessing the two-dimensional array $users inside a string. > Use echo's ability to accept multiple parameters: > > echo '<tr><td.....>', $users[$x]['U'], > '</td>....'; > > Or by concating the string with the .-Operator: > > echo > '<tr><td.....>'.$users[$x]['U'].'</td>....'; > > The first method is faster and needs less memory. > > -- > http://bithub.net/ > Synchronize and share your files over the web for free > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#284938) next »