logo
Published on Code2Design (http://code2design.com)

Lesson 3 - Strings

By David
Created Nov 9 2006 - 5:53pm

Watch the Movie of Lesson 3 [0]

Strings

Strings in PHP could be thought of as sentences such as: "I went to the store". Strings differ from variables in that they are a COLLECTION of values in one variable.
Example:

<?php
$variable 
'9';
$string 'abcdefghijklmnopqrstuvwxyz';
?>

Stings can be used to store names, tiles, addresses, and all kinds of things. So expect to use them often! Just like variables - you don't need to tell the computer that it is a "string". The computer can tell just by what value you put in it.

<?php
$0//var
$'Hi'//string
$"Fast Monkey"//string
$'K'//var 
?>

I highly recommend you read Codewalkers [1] String Primer.

Here are some links to help you learn more about strings:
tizag.com - Strings [2]
Zend.com - Adv. Strings [3]
PHP - Strings Type [4]


Source URL:
http://code2design.com/lesson_3_strings