Today's Posts
Register
     
 

EvoGFX \ Web Design \ Coding Tutorials \ Basic Variables

Coding Tutorials Want to learn some new programming languages, or just some basic designing languages like HTML? Check in here.

Reply
 
Display Modes
Old 08-09-2006, 01:11 PM   #1
Adam
Cockney Geezer
 
Adam's Avatar
 
Join Date: Aug 2005
Location: UK - East London
Posts: 3,777
Adam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fame
Default Basic Variables

PHP Code:
<?php
$hello
="Hello people,";
$php="this is my first PHP script.";
$php2="FTW!";
echo 
$hello." ".$php." ".$php2;
?>
Outputs....

Quote:
Hello people, this is my first PHP script. FTW!
I could of used just one variable, for example....

PHP Code:
<?php
$text
="Hello people, his is my first PHP script. FTW!";
echo 
$text;
?>
But I wanted to use multi variables ftw. Learn how to join them and put spaces between then and shiz.

The . is used to join two comands/variable outputs, like this.

PHP Code:
<?php
$hello
="Hello people,";
$php="this is my first PHP script.";
$php2="FTW!";
echo 
$hello.$php.$php2;
?>
That would output...

Quote:
Hello people,this is my first PHP script.FTW!
See, there is no spaces in between the variables. So we want to add spaces yea? Yea ftw. So we use " " to add spaces between the variables. But we also want to join the variables after the space so we use . " " . between the variables like this.

PHP Code:
<?php
 $hello
="Hello people,";
 
$php="this is my first PHP script.";
 
$php2="FTW!";
 echo 
$hello" " .$php" " .$php2;
 
?>
And thats how it made my first script show like it did

Hmm also instead of useing the echo command I think you can use the print command.

I think Cabal may have put this in his tut. I was just guna post what I done in showcase but then thought I may aswell show you how its done, so I made it into a little tut and posted it here.
__________________
Gamernade - 360sigs
Adam is offline   Reply With Quote
Old 08-09-2006, 01:17 PM   #2
Alletun
 
Join Date: Jan 2006
Location: Denmark
Posts: 296
Alletun has yet to receive reputation
Send a message via MSN to Alletun
Default Re: Basic Variables

Nice lil tut

on a side note: anybody here shouldn't by any chance be good in java?
Alletun is offline   Reply With Quote
Old 08-09-2006, 01:43 PM   #3
Adam
Cockney Geezer
 
Adam's Avatar
 
Join Date: Aug 2005
Location: UK - East London
Posts: 3,777
Adam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fame
Default Re: Basic Variables

Thanks

Hmmm not too sure tbh. Maybe Alexwhin, urmomma, Cabal, Pico... One of them must know how to code Javascript.
__________________
Gamernade - 360sigs
Adam is offline   Reply With Quote
Old 08-09-2006, 04:06 PM   #4
PicoDeath
 
Join Date: Jun 2005
Location: England
Posts: 10,156
PicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirt
Default Re: Basic Variables

He wants to know about java, not js adam

Nice lil tut anyway
__________________
SEOContest2008
---------------------------------------
Gamernade - 360sigs - Fresh Myspace
PicoDeath is offline   Reply With Quote
Old 08-09-2006, 06:22 PM   #5
Adam
Cockney Geezer
 
Adam's Avatar
 
Join Date: Aug 2005
Location: UK - East London
Posts: 3,777
Adam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fame
Default Re: Basic Variables

Ohhh what Java as in like the Mobile Phone Java?
__________________
Gamernade - 360sigs
Adam is offline   Reply With Quote
Old 08-09-2006, 08:13 PM   #6
P4R
Banned
 
P4R's Avatar
 
Join Date: Nov 2005
Location: Georgia
Posts: 3,493
P4R has a spectacular aura aboutP4R has a spectacular aura aboutP4R has a spectacular aura aboutP4R has a spectacular aura aboutP4R has a spectacular aura aboutP4R has a spectacular aura aboutP4R has a spectacular aura about
Send a message via MSN to P4R
Default Re: Basic Variables

too many "ftw's"
P4R is offline   Reply With Quote
Old 08-09-2006, 09:54 PM   #7
PicoDeath
 
Join Date: Jun 2005
Location: England
Posts: 10,156
PicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirtPicoDeath is a diamond in the dirt
Default Re: Basic Variables

Javas what runescape used k?
__________________
SEOContest2008
---------------------------------------
Gamernade - 360sigs - Fresh Myspace
PicoDeath is offline   Reply With Quote
Old 08-10-2006, 08:01 AM   #8
cabal
EvoCoder
 
cabal's Avatar
 
Join Date: Jul 2005
Location: Kidderminster,England
Posts: 1,330
cabal is on a distinguished roadcabal is on a distinguished road
Send a message via MSN to cabal Send a message via Skype™ to cabal
Default Re: Basic Variables

Yah java as in like not neccasarilly web based
__________________
cabal is offline   Reply With Quote
Old 08-10-2006, 02:32 PM   #9
Alletun
 
Join Date: Jan 2006
Location: Denmark
Posts: 296
Alletun has yet to receive reputation
Send a message via MSN to Alletun
Default Re: Basic Variables

Quote:
Originally Posted by cabal
Yah java as in like not neccasarilly web based
yup.

i just found out im gonna be coding in java in university instead of visual basic as i originally thought. thought i could be nice with some help if i get stuck or anything.
Alletun is offline   Reply With Quote
Old 08-11-2006, 01:44 AM   #10
urmomma
 
urmomma's Avatar
 
Join Date: Nov 2005
Posts: 524
urmomma has yet to receive reputation
Default Re: Basic Variables

I do. I took a course last year in java.

It's a good language, teaches you great practices in code design...

but warning...java is super anal-retentive.

I personally don't like to design many things in java...backend stuff... but sometimes clients ask me too...and well... money is money. lol

If your taking computer science (first course), it's very easy. You should have no problems...as its very basic stuff.

@Adam: great man! keep it up. If you need help, don't hesitate to ask. You will find PHP easy to get...just starting is the hard-part...like starting to learn your first computer language that is back-end related or a program.
__________________

GlitchSeekers
1,700+ Renders/Stocks
<?php echo "PHP is my anti-drug"; ?>
urmomma is offline   Reply With Quote
Old 08-11-2006, 12:44 PM   #11
Adam
Cockney Geezer
 
Adam's Avatar
 
Join Date: Aug 2005
Location: UK - East London
Posts: 3,777
Adam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fame
Default Re: Basic Variables

Yea thanks mate

I will try and stick around GS ftw. Tis so sexy over there.
__________________
Gamernade - 360sigs
Adam is offline   Reply With Quote
Old 08-17-2006, 05:40 AM   #12
urmomma
 
urmomma's Avatar
 
Join Date: Nov 2005
Posts: 524
urmomma has yet to receive reputation
Default Re: Basic Variables

only because mandril is over there alot with me.

lol jk
__________________

GlitchSeekers
1,700+ Renders/Stocks
<?php echo "PHP is my anti-drug"; ?>
urmomma is offline   Reply With Quote
Old 08-17-2006, 06:49 AM   #13
Jack
Bury Your Head
 
Join Date: Feb 2006
Location: Auckland, New Zealand
Posts: 716
Jack is on a distinguished roadJack is on a distinguished road
Send a message via MSN to Jack
Default Re: Basic Variables

Java is ok but you gotta have the java virtual machine and that pisses me off.

Plus its justy gay because runescape uses it.
__________________
Thinking that life matters is an understatement.
There is a larger war going on than guns and missiles,
and it is too close for comfort.
~Sky Eats Airplane - The Messenger
Jack is offline   Reply With Quote
Old 08-17-2006, 10:18 AM   #14
cabal
EvoCoder
 
cabal's Avatar
 
Join Date: Jul 2005
Location: Kidderminster,England
Posts: 1,330
cabal is on a distinguished roadcabal is on a distinguished road
Send a message via MSN to cabal Send a message via Skype™ to cabal
Default Re: Basic Variables

you can't hold a grudge against a language just cos some lame MMOG is based on it, thats just stupid imo
__________________
cabal is offline   Reply With Quote
Old 08-19-2006, 05:13 PM   #15
Adam
Cockney Geezer
 
Adam's Avatar
 
Join Date: Aug 2005
Location: UK - East London
Posts: 3,777
Adam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fameAdam has set out on a quest for fame
Default Re: Basic Variables

Quote:
Originally Posted by urmomma
only because mandril is over there alot with me.

lol jk
LOL Mandril sexed up your forum too? AHH SNAP! Fucker is sexing up everything.....
__________________
Gamernade - 360sigs
Adam is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump





Evogfx.com is an Privacy Policy and Legal
Forum skin by ForumMonkeys. Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.