Exercise (1) PHP ARRAY
Following is a multidimensional array
$itemss =array(
array(
"name"=>"Blue Pen", "Description"=>”Atlas”,
"UnitPrice"=>13.50, " AvailableStock "=>200),
array(
"name"=>"80 P-Book", "Description"=>”Atlas”,
"UnitPrice"=>65," AvailableStock “=>100),
array(
"name"=>"A4 Paper 500", "Description"=>”Atlas”,
"UnitPrice"=>500,"
AvailableStock "=>20),
array(
"name"=>"Red Pen", "Description"=>"=>”Atlas”,
"UnitPrice"=>13.50," AvailableStock "=>256),
array(
"name"=>"Back Pen", "Description"=>"=>”Atlas”,
"UnitPrice"=>13.50,"
AvailableStock "=>156) );
Above
array contains Item names and Description, Unit Price and Available Stock. You
need to calculate Stock Value of each Item and Total Stock Value print in a
following table.
Hint
: Stock Value = Unit Price * Available Stock
Post a Comment