RE: [PHP] php: assignment operator

From: Date: Wed, 07 Aug 2002 12:55:16 +0000
Subject: RE: [PHP] php: assignment operator
Groups: php.general 
Request: Send a blank email to php-general+get-111497@lists.php.net to get a copy of this message
> -----Original Message----- > From: Anthony Ritter [mailto:tony@gonefishingguideservice.com] > Sent: 07 August 2002 04:58 > > > > That's the case if strlen($counter) is 1. If it were more, > you'd see > > multiple image tags in there. > > > > --Dan > ................................ > > Thanks Dan. > > I tried an example with the number 3 replacing the number 1 > ....................... > > $image_src=$image_dir. "/" .substr($counter, $i, 3) . ".jpg"; > .......................... > > and the script works o.k. so I couldn't see the difference. That's not the length he's referring to. Consider the case where that substr reverts to substr($counter, $i, 1), but $counter="123" (so strlen($counter)==3). Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#111497) next »