SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 27th, 2004, 09:44 PM
CrimsonMoon CrimsonMoon is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 CrimsonMoon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Confused Badly

Ok, I'm new to all this, as in I've only heard of it but never actually used PHP. Um, I don't actually have a specfic question, I just really need someone who is willing to help me. I have no idea what I'm doing and I don't understand PHP at all.

Reply With Quote
  #2  
Old May 27th, 2004, 11:52 PM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 233 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 50 m 19 sec
Reputation Power: 6
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
Smile

There are a lot of begginer tutorials on the web if you search for them, many of them are here at dev articles. If you know any other programming or scripting language, then picking up the basiscs of PHP.

Here are just some basics for you though(there are other ways of doign some of the stuff I say, but this is just for you to get started with)
#1. http://www.php.net/manual/en is the location of the PHP manual in english. As you learn PHP (and probably true if you are a guru too) it is your best friend becuase it tells you everything about php although it lacks some of the great examples you cna find in tutorials throughout the web,

All php script code is held basically between an open and close tag like any other html tag
<?php ?>
Comments can be made in two ways. Using a double forward slash for a single line comment or "/* */" for multi line comments
PHP Code:
<?php
//This is a single line comment
/*This is a multi-
line comment*/
?>

to print text in php without leaving php you use the echo statement which is followed by what ever you want to say which is between either single quotes or double quotes
PHP Code:
<?php
echo 'Yo, I am a PHP script, you got a problem with that?';
//Would print into your web browsers screen if the script was run "Yo, I am a PHP script, you got a problem with that?"
/* strings surrounded by single quotes can never have variables attached to them (don't worry, this comment will make more sense later on */
echo"Yo, I am a PHP script, you got a problem with that?";
//Would print into your web browser screen if this script was run "Yo, I am a PHP script, you got a problem with that?"
/* Strings surrounded by double quotes can have variables attached ot them */
?>

Unlike some other programming languages PHP can automattically tell what type a variable is. To declare a variable you would put a dollar sign followed by the name of the variable.Then you would put an "=" and what the variable can equal. A variable can equal a number, a string(surrounded by quotes or double quotes), a function(not gonna explain this part here)
PHP Code:
<?php
$foo
=1;//variable that is called foo is = to the number 1
$bar='Yo';//variable called bar is a string
$today=getdate()//the variable called today is calling a function
$year=$today[year];//This variable is taking part of the information gathered in the function getdate
echo "I am printing these variables to the screen ".$foo.$bar.$year;
/* This will print to your browsers screen:
I am printing these variables to the screen  1Yo2004*/
?>

If you tried echoing the variables without using double quotes on the string you are echoing out without a variable it will not work correctly. You can echo a variable without a string attached to it ie.
PHP Code:
<?php
$foo
=1;
echo 
$foo;//Would print out "1" onto your browsers screen
?>


I hope this is enough to get you started
__________________
CHornJr
"One day I'll know what I am doing"
My Blog
Suanhacky Lodge #49
Rebel Squadrons

Reply With Quote
  #3  
Old May 28th, 2004, 02:28 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Whoa! - got a bit of time on your hands atm CHornJr ??
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #4  
Old June 2nd, 2004, 01:24 PM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 233 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 50 m 19 sec
Reputation Power: 6
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
Quote:
Originally Posted by stumpy
Whoa! - got a bit of time on your hands atm CHornJr ??

Just thought Id give back to the community for once

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Confused Badly


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway