Professional Documents
Culture Documents
Answers:: B. Echo "Hello World"
Answers:: B. Echo "Hello World"
1. Which is the correct PHP code that will output the "hello world".
5. In HTML, what type of input element is more suitable to use for this: to determine if you
owned a car.
10. This loop function repeats a block of statements while a condition is True or until a
condition becomes True.
1. Create a table with 2 columns and 2 rows. On first row first column set as lastname and in
second set it as firstname
"<table>
<tr>
<td>lastname></td>
<td>firstname></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>"
2. Create html element that will hold user input for Gender.
"<select>
<option>Male</option>
<option>Female</option>
</select>"
3. Write the one line code to include external css file on html page.
4. Write the one line code to include external javascript file on html page.
<script type="text/javascript"src="javascriptpath"></script>
}"
"foreach($color as $x){
echo $x;
}
or
foreach($color as $x) echo $x;
}”
5. Create a function that will validate the passed argument if a valid number.
"functionchecknum($num){
if(is_numeric($num)) return true;
else return false;
}”
class employee{
var $lastname;
var $firstname;
var $midname;
var $department;
function __construct($lname,$fname,$mname,$dept){
$this->lastname=$lname;
$this->firstname=$fname;
$this->midname=$mname;
$this->department=$dept;
}
}
or
class employee{
var $lastname;
var $firstname;
var $midname;
var $department;
function setEmp($lname,$fname,$mname,$dept){
$this->lastname=$lname;
$this->firstname=$fname;
$this->midname=$mname;
$this->department=$dept;
}
}
Reference for questions below:
8. Get and display all employees lastname having age less than 25.
1. get all finance department in table 1 and sort lastname in ascending order.
3. create a query that will link the two tables, and get the attendance of all marketing
department only.
2. Declare a variable that will hold currency value.3. Create a constant variable for Pi.
const PI=3.14
4. Assign a value on textbox on form1, for first textbox will be your lastname, and for 2nd text
box will be your firstname.
form1.textbox1.text="semacio"
form1.textbox2.text="julian"
or
with form1
.textbox1.text="semacio"
.textbox2.text="julian"
endwith