Docsity

CS508 Assignment 5: PHP and Arrays in Web Development, Exercises of Programming Languages

Toggle sidebar
bg1
Modern Programming Languages (CS508)
SPRING 2012
Assignment No. 5
Total Marks: 20 Dead line: July 06, 2012
Purpose of Assignment:
Intended purpose of this assignment is to give students an exercise using a widely-used
general-purpose scripting language ‘PHP’ that is especially suited for Web development
and can be embedded into HTML.After attempting these assignment students will be able
to:
Familiarize with the basic syntax in PHP language.
Learn about the Significance of PHP in Web applications.
Students will understand of basic Arrays syntax and declaration in PHP.
Application:
AlstraSoft Article Manager Pro Application:
Scenario:
Suppose you are developing a Article Manager Pro Application at Alstrasoft Pvt
Ltd that strives to be the premier provider of web-based software solutions for businesses
worldwide. As a web development and software company, Alstrasoft specialize mainly in
web design and software programming.
Evaluation:
Working in this web development environment through an Article Manager Pro user can
Setup their own article, news portal or magazine publishing website using Ad Sense
Optimized CMS. Now being a web Developer at this company, you are required to
answer following questions keeping in view the above constraints.
docsity.com
pf3

Partial preview of the text

Download CS508 Assignment 5: PHP and Arrays in Web Development and more Exercises Programming Languages in PDF only on Docsity!

Modern Programming Languages (CS508)

SPRING 2012

Assignment No. 5

Total Marks: 20 Dead line: July 06, 2012

Purpose of Assignment:

Intended purpose of this assignment is to give students an exercise using a widely-used general-purpose scripting language ‘PHP’ that is especially suited for Web development and can be embedded into HTML.After attempting these assignment students will be able to:

 Familiarize with the basic syntax in PHP language.

 Learn about the Significance of PHP in Web applications.

 Students will understand of basic Arrays syntax and declaration in PHP.

Application:

AlstraSoft Article Manager Pro Application:

Scenario:

Suppose you are developing a Article Manager Pro Application at Alstrasoft Pvt

Ltd that strives to be the premier provider of web-based software solutions for businesses worldwide. As a web development and software company, Alstrasoft specialize mainly in web design and software programming.

Evaluation:

Working in this web development environment through an Article Manager Pro user can Setup their own article, news portal or magazine publishing website using Ad Sense Optimized CMS. Now being a web Developer at this company, you are required to answer following questions keeping in view the above constraints.

a) Why is PHP language of choice for Developers to develop web applications nowadays? [10]

b) Consider the PHP code statements given below:

$a = array("a" => "star", "b" => "moon"); $b = array("a" => "sun", "b" => “galaxy", "c" => “earth"); $c = $a + $b; // Union of $a and $b

What will be the resultant value of array c after the execution of above code statements?[5]

c) What will be the value as output in $myarray after the execution of following PHP code statements? [5]

foreach ($myarray as &$value)

{ $value = ($value * 2)/2;

} ?>