BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

Register FAQ Community Calendar New Posts Navbar Right Corner
HOME BZU Mail Box Online Games Radio and TV Cricket 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


 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 14-06-2008, 02:15 AM
BSIT07-01's Avatar
Addicted to Computer


 
Join Date: Sep 2007
Location: ------------
Age: 36
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 Code:
<?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, 678 views)
Reply With Quote
 

Tags
array, multidimensional, php, tutorial


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

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 | BZU Multan | 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 09:53 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.