• The Facebook Platform

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Location
    Lahore, Pakistan
    Age
    25
    Posts
    3,818
    Points
    6,772.51
    Rep Power
    10000

    new_new 07 - Arrays & Array Functions in PHP - PHP/MySQL in Urdu












    CODE
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Arrays &amp; Array Functions in  PHP</title>
    </head>
    
    <body>
    
    <?php
    /* Numeric Array */
    $array = array(44,22,55,66,32,77,34,88,99);
    
    //echo $array[4];    
    
    $array2 = array("Apple","Dell","Acer","Nokia");
    //echo "This Product Made By ".$array2[3]." A Great Company";
    
    
    ?>
    
    <?php
    
    $ascArray = array(0=>12, 1=>33, 2=>44, 3=>55);
    
    //echo $ascArray["1"];
    $ascArray2 = array("FirstName"=>"Waqas","LastName"=>"Arshad","Email"=>"[email protected]");
    //echo "This is the Student ".$ascArray2["FirstName"]." Son Of ".$ascArray2["LastName"]." His Email Id is ".$ascArray2["Email"];
    
    ?>
    <?php
        $multiArray = array("Dell","HP","Acer",array("Nokia","Samsun","Sony"));
        
        //echo "<font color='red'>These Companies make Computers </font>".$multiArray[0].",".$multiArray[1].",".$multiArray[2]."<font color='red'> And These Companies make Mobiles </font>".$multiArray[3][0].",".$multiArray[3][1].",".$multiArray[3][2]." ";
        
    ?>
    
    Count : <?php echo count($array); ?><br />
    Max : <?php echo max($array); ?><br />
    Min : <?php echo min($array) ?><br />
    In Array : <?php echo in_array(99,$array)?><br />
    Sort : <?php echo sort($array) ?><br />
    <?php echo $array[2]; ?>
    
    
    </body>
    </html>
    Last edited by Їийоcёйт Кїllєґ; 10-27-2013 at 03:58 AM.
    Find Me On Social Networks

    Facebook | Twitter | Google+


  2. #2
    Join Date
    Jan 2010
    Location
    Lahore, Pakistan
    Age
    25
    Posts
    3,818
    Points
    6,772.51
    Rep Power
    10000

    Default

    Video Updated
    Find Me On Social Networks

    Facebook | Twitter | Google+



 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •