Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to declare Array variables

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 39
    Comment on it

    Hello Reader's. Array is a datastructure used to storing multiple elements inside it. But the declaring way to array is different in all the technologies.

    For example if you want to declare array in JavaScript then you can use any one out of two ways:-

    var Array= new Array();
    

    OR

    var Array= [];
    

    Now let's see how to declare array in PHP

    $b = array();
    

    By writing the syntax above a blank array named as $d will be defined. And if you want to add objects in this array then you have write like this:-

    $b = array('1' => 'abc', '2' => 'key');
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: