<?php If($I == $Here){ print "Hello!"; } ?>

Phpgod

New Member
Messages
0
Reaction score
0
Points
0
Hello my name is Chris, I am a 14 year old pc programmer, coder, php scripter, and web designer. I have been doing this for close to 5 years now. I am very experienced in the "Internet World".
 

Dmitry_airhacks

New Member
Messages
23
Reaction score
0
Points
0
Hello my name is Chris, I am a 14 year old pc programmer, coder, php scripter, and web designer. I have been doing this for close to 5 years now. I am very experienced in the "Internet World".

Welcome! :)
Didn't know that print == echo . :D
 
Last edited:

Phpgod

New Member
Messages
0
Reaction score
0
Points
0
@Dmitry_airhacks
Print is usually used for printing exploded arrays or just arrays.
print_r($COOKIES); (I believe that is the code for displaying all set cookies as an array might be incorrect don't use cookies much.)

@Everyone
Thanks xD
 

Phpgod

New Member
Messages
0
Reaction score
0
Points
0
print should be 'echo' in php.

Print is a command in php -.-, echo is used for printing dynamic scripts like ones that contain variables
EX: Echo "Lol $lol";
But Print is for things without variables.
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
Welcome to X10 PHPgod, you found the right place for PHP testing =)
 

Sanchises

New Member
Messages
17
Reaction score
0
Points
0
<? if($I == $Here and $U == $Watching[$U]){ echo "Hello, $U"; } ?>
 
Last edited:

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
<?php
$awesome = true;
$firstline = "Awesome! <br />";
$welcome = "Hello and welcome to x10, phpgod! Enjoy your stay!";

if($awesome) {
echo $firstline.$welcome;
} else {
echo $welcome;
}
?>

And sanchises, just a tip, never ever use short opening tags ;). It's annoying because the php.ini must be set to handle it, and by default it's set to off
 
Top