garym
Members
-
Joined
-
Last visited
Reputation Activity
-
garym reacted to Jay Gilford in What does .= mean in PHP?The assignment operator is a shorthand for
$a .= 'some string';
is the equivalent of
$a = $a . 'somestring';
See here for more information
-
garym reacted to Mythriel in What does .= mean in PHP?Concatenate to a string.
e.g:
$var = "This is a "; $var .= "test demonstration"; echo $var; //prints This is a test demonstration
-
garym reacted to Jay Gilford in What's wrong with this PHP code?That should work perfectly. My guess is you don't have php parsing on when it's run. Do you have the .html extension instead of .php?
-
garym reacted to Jay Gilford in What's wrong with this PHP code?Have you set a webserver up on your local machine? or are you using hosting to test this?
If you haven't set up a webserver, I'd recommend WAMP or XAMPP for windows. html is not parsed as PHP. to parse php, you need to use the .php extension, and access the file using your browser's localhost
-
garym reacted to Jay Gilford in What's wrong with this PHP code?And you're getting no output whatseover? Is the title showing in the browser at least?
-
garym reacted to Jay Gilford in What's wrong with this PHP code?Ah, there's the issue then. The closing </title> is missing the <
-
garym reacted to Jay Gilford in What's wrong with this PHP code?No problem. easy mistake to make. I'd recommend getting an IDE like phpDesigner that auto closes your tags for you. It's what I use, very helpful
-
garym reacted to Jay Gilford in An easy way to remember whether to 'echo'?If you want something to be output, you need to use echo, print, or in more severe (last output moments) exit or die