RE: [PHP] php: assignment operator
| From: | Ford, Mike [LSS] | Date: | Wed, 07 Aug 2002 13:49:30 +0000 |
| Subject: | RE: [PHP] php: assignment operator | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111502@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Anthony Ritter [mailto:tony@gonefishingguideservice.com]
> Sent: 07 August 2002 15:27
>
> So, if there was not
>
> the assignment operator like this in the script below:
>
> .=
> ...............
> $image_tag_src.="<IMG SRC=\"$image_src\" BORDER=\"0\">"
> ...............
>
> but let's say a
>
> =
>
> the output would echo ONE placeholder for the IMG SRC from 0
> through 9 -
> however when the 10th time the page was loaded it would still
> be in the
> *same* IMG SRC holder and there never be a second IMG SRC
> holder - to the
> right - (10 through 99), a third to the right of the second
> (100 through
> 999), etc.
Huh? I really don't understand what you're trying to say here, nor how number of times
the page is loaded comes into it at all. I get the impression that you don't seem to
understand what's going on here either -- so, let's take a step back, and ask if you can
tell us what you think this code fragment is doing, and what you want it to do, and then perhaps we
can work out whose misconception is where. Oh, and it would help to know what values of $counter
are involved, too!
> .................................
>
> for($i=0; $i<strlen($counter); $i++)
> {
> $image_src=$image_dir. "/" .substr($counter, $i, 1) . ".jpg";
> $image_tag_src.="<IMG SRC=\"$image_src\" BORDER=\"0\">";
>
> // assignment
> operator .=
> }
> ...............................
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