php-general Digest 25 Sep 2010 11:29:05 - Issue 6959
Topics (messages 308307 through 308310):
Re: Copying an Object
308307 by: Daniel Kolbo
308308 by: Daniel Kolbo
308309 by: Peter Lind
308310 by: Daniel Kolbo
Administrivia:
To subscribe to the digest,
On 25 September 2010 00:11, Daniel Kolbo dko...@gmail.com wrote:
On 9/24/2010 8:35 AM, Peter Lind wrote:
On 24 September 2010 14:22, Bob McConnell r...@cbord.com wrote:
From: David Hutto
On Fri, Sep 24, 2010 at 4:09 AM, Gary php-gene...@garydjones.name wrote:
Daniel Kolbo wrote:
Say you
On 9/24/2010 9:49 AM, chris h wrote:
Gang of Four
http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612
An excellent book on OOP.
Chris H.
On Fri, Sep 24, 2010 at 9:34 AM, Bob McConnell r...@cbord.com wrote:
From: chris h
On Fri, Sep 24, 2010 at
At 3:54 PM -0400 9/24/10, Bob McConnell wrote:
From: tedd
At 2:23 PM -0400 9/24/10, Bob McConnell wrote:
A switch works when a single test can dispatch all possible branches.
If
you have a series of tests where each looks for a different subset of
conditions, you need an elseif.
Not
At 9:04 PM +0100 9/24/10, Ashley Sheridan wrote:
I don't often use this type of logic, but I have used it before and
it's served me well. Essentially, a switch is a glorified if
statement, and I find them a lot nicer to read and write than a
series of if/elseif blocks.
Thanks,
Ash
Ash:
I have the following code:
$query = SELECT * FROM classics;
$result = mysql_query($query);
if (!$result) die (Database access failed: . mysql_error());
$rows = mysql_num_rows($result);
for ($j = 0 ; $j $rows ; ++$j)
{
$results[] = mysql_fetch_array($result);
}
mysql_close($db_server);
Mike,
$results[] will automatically push a value unto the end of an array.
So doing this...
--
$magic = array();
$magic[] = 'a';
$magic[] = 'b';
$magic[] = 'c';
-
is exactly this same as doing this...
--
$normal = array();
$normal[0] = 'a';
$normal[1] = 'b';
$normal[2] = 'c';
-
7 matches
Mail list logo