Did you know that you can skip over chunks of PHP using goto? Goto is not a function, but rather a control structure. You can see an example of goto in action in this article.
Here are all the basics you need to know about getting started with PHP. It's a lot easier than you might think!
PHP allows you to preform numerous mathematical tasks. You can do anything from simple addition to complex geometry. You can also do things like round numbers, convert bases, or find the absolute value of numbers.
Did you know that you can skip over chunks of PHP using goto? Goto is not a function, but rather a control structure. You can see an example of goto in action in this article.
I'm sure it's happened to you before: you sign up for a site and they generate you a unique user ID to use. One way to do this in PHP is to use the uniqid () function. This with generate a 13 or 23 character unique ID, which you can then add a prefix to if you desire. Once you send this to the user, you can then encrypt it and store it in the database.
Did you know that you can change the capitalization of strings using PHP? You can change the capitalization of stored or inputted text using a few PHP functions. These can be used to make the string all capital letters, all lower case letters, capitalize the first letter of every word, or capitalize the first letter of every string! [read how]
A unique site ID can be created in PHP using the uniqid () function. This function has two parameters we can set. The first is the prefix. This is what will be appended to the beginning of each ID. The second is more_entropy. If this is false or not specified it will return 13 characters, if it is true then 23 characters will be returned. [read more]
©2011 About.com. All rights reserved.
A part of The New York Times Company.