Get support from Xavier Media
It is currently Sun Dec 08, 2013 3:45 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Lesson 3 - Strings
PostPosted: Thu Jul 13, 2006 6:40 pm 

Points:
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';
[/php]


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]
$1 = 0; //var
$2 = 'Hi'; //string
$3 = "Fast Monkey"; //string
$4 = 'K'; //var
[/php]


Now, what you can DO with strings is the cool part! (For a list of all string functions click here.)

Some of the more important string functions are:



The strlen(); Function.


The explode(); Function.


The str_replace(); Function.


The str_split(); Function.


The strip_tags(); Function.




I highly recomend you read Codewalkers String Primer.



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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]