if($string=='word1'||$string=='word2'){// Do Something}elseif($string=='word3'||$string=='word4'||$string=='word5'||$string=='word6'||$string=='word7'){// Do Something}
First if still ok to use but in next elseif is too long! So I tried to find better way to compare many string and in_array() function is the answer.
if(in_array($string,array('word1','word2'))){// Do Something}elseif(in_array($string,array('word3','word4','word5','word6','word7'))){// Do Something}
Since I use my old 2 years hosting server. It's time to upgrade to new server with high performance to support more customers. So I have to research about installation and tuning DirectAdmin. One factor that is very important is Apache. There are many differ performance between system with tuning and without.
Factors that we have to think about choosing PHP module for Apache are performance and security. Some modules come with great performance but trade off with security while some modules are opposite.
Amateur web developers always have problem with installation of Apache + MySQL + PHP to test their code including many administrators that want to install LAMPP Server (LAMPP stands for Linux + Apache + MySQL + PHP + Perl) for doing simple web server (with less security without strict configuration). So there are software that include all LAMPP with only one installation. XAMPP is the most popular one.
Recent comments