Search Webmaster Help and Solution

[RESOLVED] problems with adding strings

Im a bit befuddled on this, as by everything I can see, this should work... but its not. Im missing something elemental, and its probably staring me right in the face. The variable $m equals big. Heres my code thus far:

PHP Code:       $contents=                echo <li><a href=\../.$m..php
      .?lg=
      ..$_GET[lg].
      .
      .\>.$m.</a></li>;
Heres what I was expecting:

PHP Code:                 echo <li><a href=../big.php?lg=.$_GET[lg].>big</a></li>;
Heres what I got:

PHP Code:                 echo <li><a href=../big.php?lg=..>big</a></li>;
Its missing the output of the $_GET ... it seems as if its trying to DO the get, rather than place the word in the string. Can anybody untie this knot? Im a bit befuddled on this, as by everything I can see, this should work... but its not. Im missing something elemental, and its probably staring me right in the face. The variable $m equals big. Heres my code thus far:

PHP Code:       $contents=                echo <li><a href=\../.$m..php
      .?lg=
      ..$_GET[lg].
      .
      .\>.$m.</a></li>;
Heres what I was expecting:

PHP Code:                 echo <li><a href=../big.php?lg=.$_GET[lg].>big</a></li>;
Heres what I got:

PHP Code:                 echo <li><a href=../big.php?lg=..>big</a></li>;
Its missing the output of the $_GET ... it seems as if its trying to DO the get, rather than place the word in the string. Can anybody untie this knot?

View Complete Thread with Replies

Related Items

Query failed: connection to localhost:3354 failed (errno=111, msg=Connection refused).