okay this is the question:
should this be done in if and else statement? i mean i just dont get the whole thing how to do it...
there's a internet web page called google.com... type "PHP" in the big box and hit enter..
http://php.net/manual/en/function.get-browser.php
php.net eke oya hama prashanetama vage uththaranum thiyanava. eeth habai ithin godak eeva thiyana nisaa hoyaganna tikak amaru vai.
Debug the following PHP document:
Write a PHP script to create an array named employee_salary. The keys of the array
are names of employees and the values are their salaries. Use the asort function to sort
the array according to the salary of the employees. Then use the ksort function to sort
the array by the names of the employees. Use the foreach statement to output the keys
and values of the array before and after sorting.
Exercise 4
Re-do exercise 3, but this time write your own sorting functions. Specifically, write
my_asort() and my_ksort() that do exactly the same as asort and ksort respectively.
Write the XHTML code to create a form with the following capabilities:
1. A text widget to collect the user’s name
2. Four checkboxes, one each for the following items
a. Four 100-watt light bulbs for $2.39
b. Eight 100-watt light bulbs for $4.29
c. Four 100-watt long-life light bulbs for $3.95
d. Eight 100-watt long-life light bulbs for $7.49
3. A text widget to collect the number of battery packs ordered by the user at the
price of $10.42 each.
4. A collection of three radio buttons that are labelled as follows:
a. Visa
b. MasterCard
c. AmericanExpress
Then write a PHP script that computes the total cost of the ordered light bulbs and
battery packs after adding 17.5 percent VAT. The program must inform the buyer of
exactly what was ordered in a table, and what credit card was chosen to make
payment.
not like google helps you all the time. some times you really need some real time help with your assignments

okay this is the question:
should this be done in if and else statement? i mean i just dont get the whole thing how to do it...
function getBrowser()
{
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$ub = '';
if(preg_match('/MSIE/i',$u_agent))
{
$ub = "Internet Explorer";
}
elseif(preg_match('/Firefox/i',$u_agent))
{
$ub = "Mozilla Firefox";
}
elseif(preg_match('/Chrome/i',$u_agent))
{
$ub = "Google Chrome";
}
return $ub;
}
and anyone know this?
it doesnt even make any sense to me ;S
and anyone know this?
it doesnt even make any sense to me ;S
and here's another Q. i know this is too much to ask for.. so im not even expecting an answer from anyone for this one lol
just posting
okay this is the question:
should this be done in if and else statement? i mean i just dont get the whole thing how to do it...
$browser = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/MSIE/i',$browser)) {
echo "you are using Microsoft Internet Explorer";
} else if (preg_match('/Firefox/i',$browser)) {
echo "you are using Firefox";
} else if (preg_match('/Chrome/i',$browser)) {
echo "you are using Chrome";
}
PHP:$browser = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/MSIE/i',$browser)) { echo "you are using Microsoft Internet Explorer"; } else if (preg_match('/Firefox/i',$browser)) { echo "you are using Firefox"; } else if (preg_match('/Chrome/i',$browser)) { echo "you are using Chrome"; }