Why I use MySQL?
1) The hosting compnay Dreamhost provides it. I can add unlimited MySQL database on it.
2) This Blog named as What A Lamp. The m of it stands for MySQL.
3) The other reasons I posted below are copied from MySQL official site. You can just treat it as an advertisement.
Posts Tagged ‘PHP’
Why MySQL
Why you want your own WordPress theme
To have a very sharp Blog, you need your own WordPress theme. There are five reasons official WordPress said you need your own WordPress theme.
* To create your own unique WordPress site look
* To take advantage of templates, template tags, and the WordPress Loop to generate different web page results and looks.
* To provide [...]
What a Lamp
This is the first post of this site.
I, as a professional Blogger, have a lot of blogs. And they are running well.
Now, I have an idea to merge two of them to improve the brand.
The brand is WHATALAMP
The meanin of this word is clear as blow.
WordPress
Hosting
Ajax
Theme
Above
Linux
Apache
MySQL
PHP
What a Lamp will focused on these topics and post [...]
Let php engine handle html as php
I have a site full of the html file. Later I added some php code into these html files. I don’t want to change the URL from .html to .php. It is not SEO friendly.
So, I would like php engine can handle html same as php.
Edit .htaccess file in the root.
RemoveHandler .html .htm
AddType application/x-httpd-php .php [...]
strpos()
Using the strpos() function
The strpos() function is used to search for a string or character within a string.
If a match is found in the string, this function will return the position of the first match. If no match is found, it will return FALSE.
Let’s see if we can find the string “world” in our string:
<?php
echo [...]
strlen()
Using the strlen() function
The strlen() function is used to find the length of a string.
Let’s find the length of our string “Hello world!”:
<?php
echo strlen("Hello world!");
?>
The output of the code above will be:
12
The length of a string is often used in loops or other functions, when it is important to know when the string ends. (i.e. [...]
Strings in PHP
String variables are used for values that contains character strings.
In this tutorial we are going to look at some of the most common functions and operators used to manipulate strings in PHP.
After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in [...]
PHP Variables
A variable are used for storing a values, like text strings, numbers or arrays.
When a variable is set it can be used over and over again in your script
All variables in PHP start with a $ sign symbol.
The correct way of setting a variable in PHP:
$var_name = myvalue;
New PHP programmers often forget the $ sign [...]
Escaping from HTML - php code block
There are about 4 or five type of ways to put the php code into Webpage.
I prefer to use following format
<?php echo 'if you want to serve XHTML or XML documents, do like this'; ?>
via
Automattic Stats is easy to install and use
Automattic Stats is just released from WordPress. Installing this stats plugin is much like installing Akismet, all you need is to put in your API Key and the rest is automatic.
The installation file is just one php file. I download it from here. Decompress it and put it under plugins folder.
Once it’s running it’ll begin [...]



