Archive for December 2013

Worldspan GDS

Guys after a long long period of time and after finishing my college life i think its the time i should share my experience and knowledge with ya, I have gone through some very intelligent systems such as GDS and currently working in the travel industry with a designation of web services programmer feel free to look at my company website and have a look at my booking engine which i have developed My Booking Engine.

Well any one having a relatively small experience in browsing websites must have already understood that the site runs on PHP yes the Personal Hypertext Processor . a pretty small language with a very small library but a wide variety of support and as always open source
take some time out of your schedule to look up the PHP website.

I am working with the webservices exposed by the travelport worldspan GDS , the worldspan is the Global Distribution System which offers the Flight information and Booking API my current employer has paid a hefty sum of $'s to Travelport to gain access to their API and i am here by telling you guys some of the tweaks to get the most optimum result from the travelport WORLDSPAN
 The Technology used by my current Employer is PHP a typical scripting language which is evolving day by day into a hardcore OOL . As a Java Developer it was really difficult for me to get into the scripting methodology so i changed it i have used typical Java Methodology of creating classes and objects for getting into the Java flavour and i was successful also, already two versions of the system are live and running over the web.
for connecting to the worldspan GDS system one requires a SOAP call for calling the the worldspan web service a SORRY for the upcoming developers that currently WORLDSPAN GDS DO NOT SUPPORT WSDL hence we have to call each operation manually.
        For the purpose of authentication the GDS API uses a tc file or a transaction control header
an example of the XML TC file is as follows:


Transaction Control Data
The transaction control data (TC) XML is part of each transaction and allows you to control the underlying provider the message is to be routed to. It is also used for user authentication on transaction level. A TC must be sent with every Xml Pro request message.
Request TC
<tc>
    <iden p="" u="">
    <provider session="" pcc=" >WORLDSPAN</provider>
    <trace></trace>
</iden><tc>





Node
Description
Default (if not specified)
iden
Client identity information for transaction authentication on Xml Pro Server.Attributes:
u = user id
p = password

 mandatory
provider
Name of the provider route. Worldspan will provide this setting.Attributes:
session = identifies session pool or data source of provider
pcc = emulation SID, Mandatory for share environment user

mandatory
trace
Free use trace id for traces to be captured with XXTrace utility
optional



Well dont worry about the technical details its just basic authentication header which could be passed over the normal HTTP or OVER SSL (HTTPS) if your company requires you to do so
let me show you a snippet of the code calling the webservice in php to give you a better understanding of how the things work
Please Be patient and look more towards the highlighted part of the code



require_once("nusoap.php"); //NuSoap library for SOAP access
require_once("class.db_handler.php");

  class request_builder
  {
      var $num_adt;
      var $num_chd;
      var $num_inf;
      var $cab_cla;
      var $origin_code;
      var $dest_code;
      var $search_type;
      var $dep_date;
      var $ret_date;
      var $req_fet;
      var $request_id;
      var $xml_request;
      var $req;
      var $params;
      var $header;
      var $operation;
      var $namespace;
  function request_builder($adt,$chd,$inf,$cabin,$ori,$dest,$srt,$depdate,$retdate,$request_id){
        $this->num_adt=$adt;
        $this->num_chd=$chd;
        $this->num_inf=$inf;
        $this->cab_cla=$cabin;
        $this->origin_code=$ori;
        $this->dest_code=$dest;
        $this->dep_date=$depdate;
        $this->ret_date=$retdate;
        $this->search_type=$srt;
        $this->namespace="xxs";
        $this->header;
        $this->operation="216.113.130.252:8800";
        $this->request_id=$request_id;
      
        $dbhan= new db_handler();
      
        $this->req=$dbhan->get_request($request_id);
        $this->build_request($this->req);
      
      }
  private function build_request($arr){
      //print_r($arr);
         $str="";
          $opt_arr=explode(",",$arr->options);
          $str.="OH";
          foreach($opt_arr as $opt){
          $str.="$opt";
          }
        
          $str.="$this->origin_code12";
          $str.="".$arr->num_alt."";
          $inc_arl_arr=explode(",",$arr->inc_arl);
          $exc_arl_arr=explode(",",$arr->exc_arl);
          if((count($inc_arl_arr)>=1||count($exc_arl_arr)>=1)&&($arr->inc_arl!=''||$arr->exc_arl!=''))
          {
              $str.="";
              if(count($exc_arl_arr)>0&&$arr->exc_arl!='')
              {
                  $str.="";
                  foreach($exc_arl_arr as $exc)
                  {
                      $str.="".$exc."";
                  }
                  $str.="";
              }
              if(count($inc_arl_arr)>0&&$arr->inc_arl!='')
              {
                  $str.="".$arr->arl_opt."";
                  foreach($inc_arl_arr as $inc)
                  {
                      $str.="".$inc."";
                  }
                
              }
            $str.="";
          }
            $rdate=$this->ret_date;
             $ddate=$this->dep_date;
        
        $ptc_arr=explode(",",$arr->ptc);
        $ptc = "$this->num_adt$ptc_arr[0]";
        if($this->num_chd>0){
        $ptc .= "$this->num_chd$ptc_arr[1]";
        }
        if($this->num_inf>0){
        $ptc .= "$this->num_inf$ptc_arr[2]";
        }
        $str.=$ptc;
        $str.="$ddate1200E$this->dest_code";
        if($this->search_type=="RT")
          {
           $str.="$rdate1200E$this->origin_code";
          }
        $str.="";
        $this->header="Worldspan";
       $this->params=$str;
       //echo $str;
      
      }
  private function normalize_date($date) {
        $date = explode('/', $date);
        $date_mon = $date[0];
        $date_dat = $date[1];
        $date_yea = $date[2];
        switch ($date_mon) {
            case 1:
                $date_mon = "JAN";
                break;
            case 2:
                $date_mon = "FEB";
                break;
            case 3:
                $date_mon = "MAR";
                break;
            case 4:
                $date_mon = "APR";
                break;
            case 5:
                $date_mon = "MAY";
                break;
            case 6:
                $date_mon = "JUN";
                break;
            case 7:
                $date_mon = "JUL";
                break;
            case 8:
                $date_mon = "AUG";
                break;
            case 9:
                $date_mon = "SEP";
                break;
            case 10:
                $date_mon = "OCT";
                break;
            case 11:
                $date_mon = "NOV";
                break;
            case 12:
                $date_mon = "DEC";
                break;
        }
        $date = $date_dat.$date_mon;
        return $date;
    }
  public function execute_request()  
    {
       // echo htmlspecialchars($this->params);
      $client= new nusoap_client("https://xmlpro.worldspan.com:443");//instance of a nusoap_client
      if($client->fault)// Check for errors
      { 
          echo $client->faultstring;
      }
      $client->timeout=5000;
      $client->response_timeout=5000;
      $result = $client->call($this->operation, $this->params, $this->namespace, null, $this->header, null, null, null);
      return $client->responseData;// We have just called the Service of the worldspan
    
    }
  }

For Complete code listing archive please check out the Google SVN for cheapfareguru.com


VBA reading from a text file

The code for reading from a text file looks like this:

Sub readtxtfile()

Defining constants
Const ForReading = 1, ForWriting = 2, ForAppending = 3

  Dim fs, f

Clear the sheet where results will be written. 65536 is the maximum line number before excel 2007. 

  Sheets("sheets 1").Rows("2:65536").Delete
 
  Set fs = CreateObject("Scripting.FileSystemObject")

  Set f = fs.OpenTextFile("file.txt", ForReading, TristateFalse)

Reading line by line until end of file.
  i = 2
  While f.AtEndOfStream <> True
      txt = Trim(f.readline)
      Sheets("sheets 1").Cells(i, 1) = txt
      i = i + 1
  Wend

End Sub

Enjoy.


SOAP and PHP

Calling a SOAP based service could not be this easy as it can be done with PHP


$objClient = new SoapClient("http://foobar.in/services/blahblah?wsdl", array('trace' => true));

$objResponse = $objClient->getGreeting(array("name" => "tom"));

//print($objClient->__getLastRequest());
print_r($objResponse);

$objResponse
stdClass Object
(
[out] => stdClass Object
(
[message] => Hello tom!
)
)

Constants in PHP

A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script (except for magic constants, which aren't actually constants). A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
The name of a constant follows the same rules as any label in PHP. A valid constant name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thusly: [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*

Example: Valid and invalid constant names

<?php
// Valid constant names
define("FOO", "something");
define("FOO2", "something else");
define("FOO_BAR", "something more");

// Invalid constant names
define("2FOO", "something");

// This is valid, but should be avoided:
// PHP may one day provide a magical constant
// that will break your script
define("__FOO__", "something");

?>

Note: For our purposes here, a letter is a-z, A-Z, and the ASCII characters from 127 through 255 (0x7f-0xff).

Like superglobals, the scope of a constant is global. You can access constants anywhere in your script without regard to scope.

Syntax

You can define a constant by using the define()-function. Once a constant is defined, it can never be changed or undefined.
Only scalar data (boolean, integer, float and string) can be contained in constants. Do not define resource constants.
You can get the value of a constant by simply specifying its name. Unlike with variables, you should not prepend a constant with a $. You can also use the function constant() to read a constant's value if you wish to obtain the constant's name dynamically. Use get_defined_constants() to get a list of all defined constants.
Note: Constants and (global) variables are in a different namespace. This implies that for example TRUE and $TRUE are generally different.
If you use an undefined constant, PHP assumes that you mean the name of the constant itself, just as if you called it as a string (CONSTANT vs "CONSTANT"). An error of level E_NOTICE will be issued when this happens. If you simply want to check if a constant is set, use the defined() function.

These are the differences between constants and variables:
• Constants do not have a dollar sign ($) before them;
• Constants may only be defined using the define() function, not by simple assignment;
• Constants may be defined and accessed anywhere without regard to variable scoping rules;
• Constants may not be redefined or undefined once they have been set; and
• Constants may only evaluate to scalar values.

Example: Defining Constants

<?php
define("CONSTANT", "Hello world.");
echo CONSTANT; // outputs "Hello world."
echo Constant; // outputs "Constant" and issues a notice.
?>

ListAppend

ListAppend is a rather simple utility function, however when you are dealing with lists, it can prove a great ally. This is a function that I pulled out of a class of list functions. I will publish the entire class once I get the individual functions published. The default delimiter for the ListAppend function is a ','. The delimiter length should be 1 character. Regardless of the size of the delimiter, the function will only use the first character.

The Function:

<php

function ListAppend($list,$value,$delimiter= ",")
{
$delimiter = substr($delimiter,1);
$nList = $list . $delimiter . $value;
return $nList;
}

?>

Usage:
StatementOutputComment
ListAppend('elem1,elem2', '' )elem1,elem2,Appended element is empty; delimiter is last character in list; list length is 2.
ListAppend('', 'elem1,elem2' )elem1,elem2List length is 2.
ListAppend("one___two", "three", "___")"one___two_three"Inserted the first character of delimiters before "three."

ListAppend works great to add values to a list. This function will default to a ',' for a delimiter!

For Example:

<?php
$list = "abcd";
$value = "Z";
echo ListAppend($list,$value);
?>


The results is 'abcd,Z'!

By sending the correct delimiter through, in this case '':

<?php
$list = "abcd";
$value = "Z" ;
echo ListAppend($list,$value,"");
?>


The results is 'abcdZ'!

Simple File Upload

The standard username and password are: file and password.

You can edit this by opening the index.php file.



The stylesheet you can, if you want so, edit this to your own wishes.

Standard you will see two file inputs. You can change this be settings
the $files_to_upload to another value.
Download Link:

http://lonsmall.summerhost.info/download.php?file=215simple_fileupload1_13.zip

Credit Repair - It's All About Saving Money

crack hotmail password, cannot fault this service from http://www.activehacker.org/how-to-hack-hotmail-password.php! Supports all I need and request was quick and easy. Even though hack facebook passwords service checks each application, it makes me feel secure hack sbcglobal email the service is top quality. The best thing however is the feedback/help service. Any help or request is dealt with and usually delivered in cracking time! Great job, no need to look anywhere else! Oh, and a whopping $100.00 ! which is usually more than hack into facebook profiles to know crack hotmail password! ActiveHackers.com is excellent. the support is amazing, I'm Free Download Ihacking V21 Hack Facebook Hacking Yahoo Crack Hotmail Cracking Gmail because How To Hack Yahoo Password group doesn't even offer this ammount of support. I found these people reliable, efficient and not too expensive. Thanks http://www.activehacker.org/how-to-hack-hotmail-password.php.

BTW, I found another website that can hack into someones yahoo passwords and other one specialized in hack hotmail passwords.

Michael Bellamy, Lincoln

England

Why is credit Activehacker important? It comes down to one simple thing - saving money.

Everyone has a credit report. It turns out that about 70% of all credit reports contain inaccurate or untimely information. This can have an adverse effect on your credit score and that can cost you money. Credit repair is the process you undertake to remove or correct these errors on your credit report.

The great thing about repairing your credit is it's not difficult to do. The first step is to how to hack facebook a copy of your credit report. If you have been turned down for a loan or credit, you are entitled to a free credit report within 60 days of the rejection. You are also entitled to 1 free report from each of the 3 credit reporting agencies each year.

The next step is to let the credit reporting agency know in writing what information you think is inaccurate and request that it be removed or corrected. Make sure you send the letter by certified crack facebook account so you have a receipt with a record of when you sent it. Always keep copies of your letters.

The credit reporting agencies have 30 days to investigate your dispute and get back to you. If they find the information under dispute to be inaccurate, they must notify all three credit reporting agencies and the creditor or organization that provided the information. All of them must correct the information in your file.

When the investigation is complete, the credit reporting agency will provide you with the results and a copy of your updated credit report for your review.

If the investigation does not resolve the issue, you can request to have a statement of the dispute added to your file and on future credit reports.

Then you need to send a letter to the creditor or organization that provided the inaccurate information, telling them that you dispute their information. Include all documents that support your position. If the creditor reports the information to a credit reporting agency, it must also include a notice of the dispute.

So why go through this exercise? Your credit score determines how much interest you pay on loans or credit. If you add up how much interest you pay on your car loan, home mortgage and insurance, you can see just how much money is at stake - it can be thousands, tens of thousands or even hundreds of thousands of dollars. It can even determine if you get a job or not.

Credit repair is how to hack into facebook account in making sure your credit report is accurate so you can save money - sometimes a great deal of money.
Thomas Erikson is co-founder of http://www.your-debt-consolidation-loan.com which provides http://www.your-debt-consolidation-loan.com/credit-repair.html information and solutions.

PHP do-while loop

In the PHP while loop if the initial condition is false then it will not execute the inner code but in real life application sometimes we need to execute the inner code at least one time even the condition is false. To do this PHP provides do-while loop. So the general form of PHP do-while loop is

do{

 //The body

   }while(condition);
In each time the do-while loop first executes the body of the loop and then evaluates the condition. If the condition returns true then the loop will repeat otherwise the loop terminates.

PHP do-while example

Now take a look at an example based on PHP do-while condition.
<?php
$value=1;
do
{
    echo $value;
    $value++;
    }while(!$value==1);
?> 
In this code snippet at first it prints the value 1 though the condition is not true. After printing 1 then it checks the while condition. Now the while condition is false so that the loop will be terminated. Consider another example where the while condition returns true.
<?php
$value=10;
do
{
    echo $value."<br>";
    $value--;
    }while($value>0);
?>
Try to understand the output. I think you understand the PHP do-while loop.

Download Appropriate Packages.

Most of the people fail to install Apache PHP and
MySQL because they do not download appropriate
packages. So, I am listing packages and links to
download them :

Apache : apache_2.2.6-win32-x86-no_ssl.msi
from http://www.apache.org/

PHP : php-5.2.5-Win32.zip

from http://www.php.net/

MySQL : mysql-5.0.45-win32.zip (with Set up) and

mysql-gui-tools-5.0-r12-win32.msi
to learn genuine money making techniques.
If you are facing any other problem (Error) regarding
Apache PHP and MySQL then please mail me directly
GuDLuck!



Checking string size

We usually using strlen() function to check the string size. The fast way to checking string size is using isset().

if (strlen($str) <>
echo ‘String must be at least 5 chars’;
}

if (!isset($str{5})) {
echo ‘String must be at least 5 chars’;
}

isset() needs more little time than strlen() because isset() is construction language.

Contoh Perubahan Proses Bisnis/Sosial Akibat Teknologi yang Melunturkan Nilai Etika Tradisional


1.   Televisi 

        a.    Teknologi yang digunakan
          Televisi sebagai media informasi

        b.    Model kerja
Televisi sebagai media informasi dari berbagai belahan dunia dari informasi teknologi, ekonomi, hokum, social dll, yang menampilkan secara nyata

        c.    Nilai tradisional yang hilang
Namun media informasi ini telah banyak menghilangkan etika tradisional diantaranya ;
nilai sopan santun terhadap orang yang lebih tua/sesama, cara berpenampilan, sikap dan berprilaku (akhlaq seseorang ), juga menimbulkan kemalasan, dan lupa waktu.
dengan tayangan - tayangan yang ditontonkan banyak membuat perebuhan gaya hidup manusia meniru budaya-budaya yang ditampilkan, yang umumnya banyak menampilkan budaya orang-orang barat, seperti berpacaran, genk berandal, sopan santun yang sudah tidak sesuai etika, bahkan hingga pergaulan bebas, dll.

2.   PS (PLAYSTATION)

        a.    Teknologi yang digunakan
         yaitu PS (Playstation). PS banyak digemari dikalangan masyarakat baik   anak anak maupun dewasa.

        b.    Model kerja
      Permainan game berbagai variasi pilihan seperti game sepak bola, balap,                stategi yang terpanpang secara visual, maupun dalam bentuk 3D

        c.    Nilai tradisional yang hilang
     terkuburnya permainan-permainan trdisional, berkurangnya tingkat     kretivitas pada anak-anak, malas belajar, ketergantungan, lupa waktu, bolos sekolah, hilangnya sopan santun, taruhan, bahkan hingga mencuri atau membajak orangmungkin diatas hanya sebagian dari teknologi yang merubah nilai etika tradisonal




connect with database in php with mysql

connection.inc.php :

<?php
$host='localhost';
$user_name='rootgf';
$password='';
@$con = mysql_connect("$host","$user_name","$password");
if ($con)
 {echo '<br>host coonected<br>';}
else
  {
  die('Could not connect ');
  }
?>

connection.php :

<?php

require 'connection.inc.php';



mysql_close($con);
?>

run  " connection.php"
output :
host coonected



array
arrays display
associative arrays in php
multi dimensional arrays in php
for each statements with arrays in php
add one arry to another array or append
array reduce with array_splice() in php
array to string in php
change array size using array_pad() in php
delete array elements with unset() in php
check array index or key with user inputs in php
checking if an element is in array or not using in php

PHP Security by Example

Almost an entire month has passed since my last blog entry, and a lot has happened. I'll try to catch up over the next week or two.

About a week ago, the Flash version of PHP Security by Example was Dugg.

I'm always disappointed to see trolls (Digg seems to have a bigger problem with this than Slashdot), but a few of the comments raise some valid questions. I'll try to summarize and answer those here.

It's true that slides are never a substitute for a talk, and this is especially true for this one, because it's a hands-on workshop. It's something Marco calls a BYOL (bring your own laptop), and it involves a lot of one-on-one attention and hand-holding.

The reason it's in Flash is because the person submitting the story linked to the Flash version. :-) To be fair, the only other format available for this talk is PDF. I've been wanting to create a nice web application for viewing Keynote slides. I think the best approach might be to export the slides as images, and create a simple slide navigator. I can always continue to also offer PDF, Quicktime, and Flash formats.

php arrays


Array: An array is a variable,which can store multiple values in a single variable with same data type. A data type may be number or string or any data type.
In PHP, there are three kind of arrays:
Numeric array
- An array with a numeric index
Associative array
- An array where each ID key is associated with a value

Multidimensional array
- An array containing one or more arrays



1) Numeric arrary example:


<?php
$course=Array("php","java","dotnet","C++");

echo "$course[0]<br/>";
echo "$course[1]<br/>";
echo "$course[2]<br/>";
echo "$course[3]<br/>";
?>


Out Put:
php

java
dotnet
C++
2)Associative array
<?php

$course=array("java"=>jsp,"dotnet"=>asp,"c++"=>oops);
echo "java is basic for" .$course['java']."learning<br/>";
foreach($course as $cat=>$dept)
{
echo $cat."=>".$dept;
echo "<br/>"; }
?>

?>

Out put:
java is basic forjsplearning
java=>jsp
dotnet=>asp
c++=>oops

3)Multidimensional array<?php
$books = array(
array('Engineering','Civil', 'ComputerScience','Mechanical'),
array('Management','Hospitality','HumanResource','Quality'),
);?>
<table border="1"><tr>
<th>Category Name</th>
<th>Dept-1</th>
<th>Dept-2</th>
<th>Dept-3</th> </tr>
<?php
foreach($books as $cat){
echo '<tr>';
foreach($cat as $dept) {
echo "<td>$dept</td>"; }
echo '</tr>';}
?>



Out put:

Category NameDept-1Dept-2Dept-3
EngineeringCivilComputerScienceMechanical
ManagementHospitalityHumanResourceQuality



PHP Arrays

An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length.
There are three different kind of arrays and each array value is accessed using an ID c which is called array index.
  • Numeric array - An array with a numeric index. Values are stored and accessed in linear fashion
  • Associative array - An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.
  • Multidimensional array - An array containing one or more arrays and values are accessed using multiple indices

NOTE: Built-in array functions is given in function reference PHP Array Functions

Numeric Array
These arrays can store numbers, strings and any object but their index will be prepresented by numbers. By default array index starts from zero.
Example
Following is the example showing how to create and access numeric arrays.
Here we have used array() function to create array. This function is explained in function reference.
<html>
<body>
<?php
/* First method to create array. */
$numbers = array( 1, 2, 3, 4, 5);
foreach( $numbers as $value )
{
  echo "Value is $value <br />";
}
/* Second method to create array. */
$numbers[0] = "one";
$numbers[1] = "two";
$numbers[2] = "three";
$numbers[3] = "four";
$numbers[4] = "five";

foreach( $numbers as $value )
{
  echo "Value is $value <br />";
}
?>
</body>
</html>
This will produce following result:
Value is 1
Value is 2
Value is 3
Value is 4
Value is 5
Value is one
Value is two
Value is three
Value is four
Value is five
Associative Arrays
The associative arrays are very similar to numeric arrays in term of functionality but they are different in terms of their index. Associative array will have their index as string so that you can establish a strong association between key and values.
To store the salaries of employees in an array, a numerically indexed array would not be the best choice. Instead, we could use the employees names as the keys in our associative array, and the value would be their respective salary.
NOTE: Don't keep associative array inside double quote while printing otheriwse it would not return any value.
Example
<html>
<body>
<?php
/* First method to associate create array. */
$salaries = array(
                  "mohammad" => 2000,
                  "qadir" => 1000,
                  "zara" => 500
                 );

echo "Salary of mohammad is ". $salaries['mohammad'] . "<br />";
echo "Salary of qadir is ".  $salaries['qadir']. "<br />";
echo "Salary of zara is ".  $salaries['zara']. "<br />";

/* Second method to create array. */
$salaries['mohammad'] = "high";
$salaries['qadir'] = "medium";
$salaries['zara'] = "low";

echo "Salary of mohammad is ". $salaries['mohammad'] . "<br />";
echo "Salary of qadir is ".  $salaries['qadir']. "<br />";
echo "Salary of zara is ".  $salaries['zara']. "<br />";
?>
</body>
</html>
This will produce following result:
Salary of mohammad is 2000
Salary of qadir is 1000
Salary of zara is 500
Salary of mohammad is high
Salary of qadir is medium
Salary of zara is low
Multidimensional Arrays
A multi-dimensional array each element in the main array can also be an array. And each element in the sub-array can be an array, and so on. Values in the multi-dimensional array are accessed using multiple index.
Example
In this example we create a two dimensional array to store marks of three students in three subjects:
This example is an associative array, you can create numeric array in the same fashion.
<html>
<body>
<?php
   $marks = array(
               "mohammad" => array
               (
               "physics" => 35,          
               "maths" => 30,    
               "chemistry" => 39         
               ),
               "qadir" => array
                (
                "physics" => 30,
                "maths" => 32,
                "chemistry" => 29
                ),
                "zara" => array
                (
                "physics" => 31,
                "maths" => 22,
                "chemistry" => 39
                )
             );
   /* Accessing multi-dimensional array values */
   echo "Marks for mohammad in physics : " ;
   echo $marks['mohammad']['physics'] . "<br />";
   echo "Marks for qadir in maths : ";
   echo $marks['qadir']['maths'] . "<br />";
   echo "Marks for zara in chemistry : " ;
   echo $marks['zara']['chemistry'] . "<br />";
?>
</body>
</html>
This will produce following result:
Marks for mohammad in physics : 35
Marks for qadir in maths : 32
Marks for zara in chemistry : 39