HOME BZU Mail Box Online Games Radio and TV Live Cricket Score All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Welcome to all the Students Tutorial

Tutorial Teach,Learn,Share,Discuss and Do everything other than Class Lectures


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 13-06-2008, 12:32 AM   #1
[PHP] Multidimensional Array
BSIT07-01 BSIT07-01 is offline 13-06-2008, 12:32 AM


Alsalam O Alaikum

Check out this tiny PHP file to add 1st 5th and 9th number in multidimensional array(Two dimensional in my case)


http://bzupages.com/php/array.php


If you need the coding of this file , please reply here & I will post the coding here

Thanks

 
BSIT07-01's Avatar
BSIT07-01
Addicted to Computer


Join Date: Sep 2007
Location: ------------
Age: 28
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
Views: 1440
Reply With Quote
  #2  
Old 13-06-2008, 11:35 PM
!!Ahmad Mushtaq!!'s Avatar
Warning!: Computer Maniac


 

Join Date: Oct 2007
Location: In Umer Hall. Permanent Address : Zahir Pir, RYK, Punjab.
Age: 28
Posts: 237
Contact Number: Sorry. You can contact me through email... Thanks!
Program / Discipline: BSIT
Class Roll Number: 07-45
!!Ahmad Mushtaq!! has a spectacular aura about!!Ahmad Mushtaq!! has a spectacular aura about!!Ahmad Mushtaq!! has a spectacular aura about
Default Re: [PHP] Multidimensional Array


Assalama-o-Alaikum!

Great! Thanx a lot! Will you please give me the code?
Reply With Quote
  #3  
Old 14-06-2008, 02:15 AM
BSIT07-01's Avatar
Addicted to Computer


 

Join Date: Sep 2007
Location: ------------
Age: 28
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
BSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant future
Default Re: [PHP] Multidimensional Array


Here is the Code...
It's not being displayed Perfectly because site is taking this as HTML and is showing Line breaks where I have used < BR > tag . So download the attached file for original Coding

thanks

<?PHP


$myarray
[0][0]=rand(0,100);
$myarray[0][1]=rand(0,100);
$myarray[0][2]=rand(0,100);
$myarray[1][0]=rand(0,100);
$myarray[1][1]=rand(0,100);
$myarray[1][2]=rand(0,100);
$myarray[2][0]=rand(0,100);
$myarray[2][1]=rand(0,100);
$myarray[2][2]=rand(0,100);

echo 
$myarray[0][0]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[0][1]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[0][2]."".$myarray[1][0]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[1][1]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[1][2]."".$myarray[2][0]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[2][1]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$myarray[2][2];

print 
"";



$sum=$myarray[0][0]+$myarray[1][1]+$myarray[2][2];
echo 
'Sum of 1st 5th and 9th element is '.$sum;

?>

Kyun Ho gaya na !!!!
Attached Files
File Type: php Array[BZUPAGES.COM].php (914 Bytes, 406 views)
Reply With Quote
Reply

Tags
array, multidimensional, php, tutorial


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array program in C sharp thecool Visual Programming 0 17-06-2011 08:59 PM
Program to enter 10 integers in a single-dimension array and then print out the array in ascending order bonfire Object Oriented Programming 0 09-03-2011 12:23 AM
Lesson 8: Array basics bonfire Introduction to Computing 0 26-02-2011 10:30 PM
Q3:Jagged Array of 3 rows shmsa Visual Programming 0 06-12-2009 06:08 PM
Multiplication of Array in OOPs Muhammad Sohail Akhtar Tutorial 0 26-06-2008 11:47 PM

Best view in Firefox
Almuslimeen.info | Cloud Computing | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 11:55 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.