PHP & MySQL Tutorial – 13: Arrays




Thanks for watching! Check out my other tutorials at: https://www.youtube.com/user/madhurbhatia89?feature=guide.

Original source


10 responses to “PHP & MySQL Tutorial – 13: Arrays”

  1. <?php

    $arr=array(15,10,85.78,"Jim","Peter");

    echo $arr[3]; echo "<br />";

    echo $arr[0]; echo "<br />";

    $arr[1]=25;

    echo $arr[1]; echo "<br />";

    print_r($arr); echo "<br />";

    $myarray=array(8,10,15, array(19,23,28,30));

    //$myarr=(8,10,15,(19,23,28,30));

    echo $myarray[3][1]; echo "<br />";

    print_r($myarray);

    ?>

  2. hi,
    For line 12 I get an error message saying " Notice: Array to string conversion in C:wampwwwLearningArrays.php on line 12"

    on my note++, line 11 I have :
    $my=[0,1,2,3,[4,5]];

    and line 12: 
    echo$my[4],[1];

    I want it to display '5'

    Thanks for the help.

Leave a Reply