If you are using windows 7 and not yet installed any antivirus software, Microsoft Security Essentials is not bad to use. If you want, please click here.
Tuesday, August 19, 2014
Partition Manager Software
You can manage the partitions in your computer by using this software. This software is totally cool to use. And it is free a well. If you want to download it, please click here.
Thursday, August 14, 2014
String Shuffle in PHP
<?php
$string = 'Iamthetnaingwinandtestingphpcode!';
$string_shuffle = str_shuffle($string);
$result = substr($string_shuffle, 0, 5);
echo $result;
?>
$string = 'Iamthetnaingwinandtestingphpcode!';
$string_shuffle = str_shuffle($string);
$result = substr($string_shuffle, 0, 5);
echo $result;
?>
String in PHP
<?php
$string = 'This is a string and testing!';
$string_word_count = str_word_count($string, 1);
print_r($string_word_count);
?>
$string = 'This is a string and testing!';
$string_word_count = str_word_count($string, 1);
print_r($string_word_count);
?>
Function With Return Value In php
<?phpfunction add($num1, $num2){
$result = $num1 + $num2;
return $result;
}
function divide($num1, $num2){
$result = $num1/$num2;
return $result;
}
echo $sum = add(100,100) - divide(50,2);
?>
$result = $num1 + $num2;
return $result;
}
function divide($num1, $num2){
$result = $num1/$num2;
return $result;
}
echo $sum = add(100,100) - divide(50,2);
?>
Saturday, August 9, 2014
Function With Argument
<?php
$num1 = 1000;
$num2 = 500;
function ADD($num1, $num2){
echo $result = $num1 + $num2;
}
ADD($num1, $num2);
?>
$num1 = 1000;
$num2 = 500;
function ADD($num1, $num2){
echo $result = $num1 + $num2;
}
ADD($num1, $num2);
?>
Switch Statement in PHP
$date = 'Sunday';
switch($date){
case 'Saturday';
case 'Sunday';
echo 'It is weekend!';
break;
default;
echo 'It is not weekend day!';
break;
}
?>
switch($date){
case 'Saturday';
case 'Sunday';
echo 'It is weekend!';
break;
default;
echo 'It is not weekend day!';
break;
}
?>
Friday, August 8, 2014
For Loop in PHP
<?php
$text = 'I love you';
for($count = 1; $count <= 10; $count++){
echo $count. ' '.$text. '!</br>';
}
?>
$text = 'I love you';
for($count = 1; $count <= 10; $count++){
echo $count. ' '.$text. '!</br>';
}
?>
Do While Loop
<?php
$text = 'I love you';
$count = 1;
do{
echo $count.' ' .$text. '!</br>';
$count ++;
}
while ($count <= 10)
?>
$text = 'I love you';
$count = 1;
do{
echo $count.' ' .$text. '!</br>';
$count ++;
}
while ($count <= 10)
?>
While Loop
<?php
$text = 'I love you';
$count = 1;
while($count <= 10){
echo $count. ' '.$text.'!</br>';
$count ++;
}
?>
$text = 'I love you';
$count = 1;
while($count <= 10){
echo $count. ' '.$text.'!</br>';
$count ++;
}
?>
If Statement
<?php
$text = 'I love you!';
$text1 = 'I hate you!';
if ($text == $text1){
echo 'True';
}else{
echo 'False';
}
?>
$text = 'I love you!';
$text1 = 'I hate you!';
if ($text == $text1){
echo 'True';
}else{
echo 'False';
}
?>
Thursday, August 7, 2014
Creating First PHP File
For example,
Create a
folder in the C: > Xampp > htdoc .
Give
name to that folder. (Here I give testing).
Write
the following sample code and name it index.php and save it in the (testing) folder.
<?php
echo 'Welcome
to TNW(Computer & IT Solutions)!';
?>
Then, open
the browser and type:
Localhost/testing/index.php.
You will
see Welcome to TNW(Computer & IT Solutions)!.
Wednesday, August 6, 2014
Installing Xampp in Windows
Sometimes we need to decrease/disable the user account control level when installing Xampp in our computer. And we better disable anti virus software if we've installed any anti virus software in our computers while we are installing Xampp software. After installing xampp, enable your anti virus software again.
How to decrease user account control level
1. Click start button
2. Type uac in it and press under key.
3. Then uac setting dialog box will be appeared and change the pointer to the lowest position and click ok.
4. Then install the xampp software.
5. After installing xampp, open your web browser and type localhost in it.
6. If you see the following welcome page, your installation is successful.
**Thank You**