PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



array newbie

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General
View previous topic :: View next topic  
Author Message
alwoodman



Joined: 06 Oct 2004
Posts: 148
Location: Swansea

PostPosted: Mon Nov 08, 2004 11:58 pm    Post subject: array newbie Reply with quote

We're trying to create a wave height prediction model to predict swell size at a local beach the variables are as follows.
the following figures come from a wave buoy situated some 15 miles off the coast on an hourly basis
I need a little help with an array we have it in excel buy no idea how to write it in php
wave period in seconds
wave height ft

Period Factor
4.5 0
8 0.5
12.5 1


Example:
Given Period this predicts the factor (sec) = 8secs
Given Wave height (ft) = 13ft
Factor Prediction = 0.458549223
Wave height prediction = 5.961139896

Cheers

Lee
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
alwoodman



Joined: 06 Oct 2004
Posts: 148
Location: Swansea

PostPosted: Tue Nov 09, 2004 12:02 am    Post subject: Reply with quote

Period Space Factor
4.5 Space 0
8 Space 0.5
12.5 Space 1
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
papercrane



Joined: 16 Jul 2004
Posts: 637
Location: California, US

PostPosted: Tue Nov 09, 2004 12:02 am    Post subject: Reply with quote

You didn't really ask a question.

A two dimentional array works like this:

Code:
$a = array(array(1, 2), array(3, 4), array(5, 6));
echo $a[2][0]; //will output 5


or

Code:
$a[0][0] = 1;
$a[0][1] = 2;
$a[2][0] = 5;
//etc
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
alwoodman



Joined: 06 Oct 2004
Posts: 148
Location: Swansea

PostPosted: Tue Nov 09, 2004 12:17 am    Post subject: Reply with quote

Confused

can't get my head round that at all, gonna do some research on arrays i think..

Lee
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



PHP Code Examples
 Stream diffrent sizes of images from a single image to save disk space.
 JavaScript dropdown list menu to switch any page.
 Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
 PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
 Link Extractor - This function is used to extract links from a given URL. This will convert relative path into absolute path and also remove PHPSESSID stuff.
 Building a Dynamic Form using Javascript and innerHTML. Add form elements in realtime without refreshing the page.
 A PHP Calendar function with CSS : add a cool calendar to any php page by just adding a calendar class based function.
Post new topic   Reply to topic    WeberForums.com Forum Index -> PHP General All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum