NUMERIC ARRAYS IN PHP BY SKYLAR NEILSON. WHAT ARE NUMERIC ARRAYS? They are arrays with a numeric index and the values are stored and accessed in linear.

Slides:



Advertisements
Similar presentations
Using GET data within a IF Statement. If ($GETCom === ‘home’) { echo ’They Match’; } $GETCom = $_GET[‘com’]; If the data stored in the variable ($GETCom)
Advertisements

Test practice Multiplication. Multiplication 9x2.
Analysis of Algorithms CS Data Structures Section 2.6.
Programming Logic and Design Sixth Edition
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
NUMERIC ARRAYS DEBBI HAMNER CIT 336 TEACHING PRESENTATION.
Презентація за розділом “Гумористичні твори”
Центр атестації педагогічних працівників 2014
Галактики і квазари.
Характеристика ІНДІЇ.
Процюк Н.В. вчитель початкових класів Боярської ЗОШ І – ІІІ ст №4
Microsoft® Small Basic
ITM © Port, Kazman1 ITM 352 HTML Forms, Basic Form Processing.
Chapter 3 Array. Indexed Versus Associative Arrays There are two kinds of arrays in PHP: indexed and associative. The keys of an indexed array are integers,
INTERNET APPLICATION DEVELOPMENT For More visit:
Lecture 6 – Form processing (Part 1) SFDV3011 – Advanced Web Development 1.
Arrays and Fact Families
Array Cs212: DataStructures Lab 2. Array Group of contiguous memory locations Each memory location has same name Each memory location has same type a.
Arrays Array – Group of contiguous memory locations Each memory location has same name Each memory location has same type.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
PHP Flow Control. if Almost identical to C
Syntax : If ( Expression ) If ( Expression ) {Statements; } Example : ?>
Revision Lecture Mauro Jaskelioff. AWK Program Structure AWK programs consists of patterns and procedures Pattern_1 { Procedure_1} Pattern_2 { Procedure_2}
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
Two-Dimensional Arrays That’s 2-D Arrays Girls & Boys! One-Dimensional Arrays on Steroids!
Python Arrays. An array is a variable that stores a collection of things, like a list. For example a list of peoples names. We can access the different.
© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri
Духовні символи Голосіївського району
Lecture 2 Conditional Statement. chcslonline.org Conditional Statements in PHP Conditional Statements are used for decision making. Different actions.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
Copyright © 2010 Pearson Education, Inc. All rights reserved. 2.7 – Slide 1.
 An array stores multiple values in one single variable.  Example: Output: I like Honda Civic, BMW and Toyota.
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
PHP Overview. What is PHP Widely available scripting language Free Alternative to Microsoft’s ASP Runs on the Web Server; not in the browser Example:
© 207 M. Tallman. © 2007 M. Tallman Array- objects or symbols displayed in rows and columns. 3 Rows 4 Columns of 4 of 3.
ENG College of Engineering Engineering Education Innovation Center 1 Arrays in MATLAB Topics Covered: 1.Creating arrays of numbers vectors matrices.
PHP – Hypertext Preprocessor.
EVEN NUMBERS EVEN NUMBERS 1 = prime 2 = prime1 3 = prime 4 = 2 x 22 5 = prime 6 = 2 x 33 7 = prime 8 = 2 x 2 x 24 9 = 3 x 3 10 = 2 x 55.
continued on next slide
                                                                                                                                                                                                                                                
continued on next slide
continued on next slide
Проф. д-р Васил Цанов, Институт за икономически изследвания при БАН
ЗУТ ПРОЕКТ на Закон за изменение и допълнение на ЗУТ
О Б Щ И Н А С И Л И С Т Р А П р о е к т Б ю д ж е т г.
Електронни услуги на НАП
Боряна Георгиева – директор на
РАЙОНЕН СЪД - БУРГАС РАБОТНА СРЕЩА СЪС СЪДЕБНИТЕ ЗАСЕДАТЕЛИ ПРИ РАЙОНЕН СЪД – БУРГАС 21 ОКТОМВРИ 2016 г.
Сътрудничество между полицията и другите специалисти в България
Съобщение Ръководството на НУ “Христо Ботев“ – гр. Елин Пелин
НАЦИОНАЛНА АГЕНЦИЯ ЗА ПРИХОДИТЕ
ДОБРОВОЛЕН РЕЗЕРВ НА ВЪОРЪЖЕНИТЕ СИЛИ НА РЕПУБЛИКА БЪЛГАРИЯ
Съвременни софтуерни решения
ПО ПЧЕЛАРСТВО ЗА ТРИГОДИШНИЯ
от проучване на общественото мнение,
Васил Големански Ноември, 2006
Програма за развитие на селските райони
ОПЕРАТИВНА ПРОГРАМА “АДМИНИСТРАТИВЕН КАПАЦИТЕТ”
БАЛИСТИКА НА ТЯЛО ПРИ СВОБОДНО ПАДАНЕ В ЗЕМНАТА АТМОСФЕРА
МЕДИЦИНСКИ УНИВЕРСИТЕТ – ПЛЕВЕН
Стратегия за развитие на клъстера 2015
Моето наследствено призвание
Правна кантора “Джингов, Гугински, Кючуков & Величков”
Безопасност на движението
STORE MANAGER RESPONSIBILITIES.
Type in name of presentation here
Objective: Learn to use a table to find equivalent ratios and rates.
continued on next slide
continued on next slide
Presentation transcript:

NUMERIC ARRAYS IN PHP BY SKYLAR NEILSON

WHAT ARE NUMERIC ARRAYS? They are arrays with a numeric index and the values are stored and accessed in linear fashion. The index, by default, always starts at “0” and continue on up the number line. There are two methods to creating a numeric array (see next slide for example methods)

EXAMPLES OF NUMERIC ARRAYS Method 1 - One statement array $numbers = array( 1, 2, 3, 4, 5); Method 2 -Multiple statements array $numbers[0] = "one"; $numbers[1] = "two"; $numbers[2] = "three"; $numbers[3] = "four"; $numbers[4] = "five"; This is the name of the array

EXAMPLES OF NUMERIC ARRAYS Method 1 - One statement array $numbers = array( 1, 2, 3, 4, 5); Method 2 -Multiple statements array $numbers[0] = "one"; $numbers[1] = "two"; $numbers[2] = "three"; $numbers[3] = "four"; $numbers[4] = "five"; These are the values

EXAMPLES OF NUMERIC ARRAYS Method 1 - One statement array $numbers = array( 1, 2, 3, 4, 5); Method 2 -Multiple statements array $numbers[0] = "one"; $numbers[1] = "two"; $numbers[2] = "three"; $numbers[3] = "four"; $numbers[4] = "five"; These are places, they start at 0, not at 1

TO VIEW ALL VALUES IN THE ARRAY Use echo and the name of the array to display the array’s values $numbers = array( 1, 2, 3, 4, 5); echo “$numbers” $numbers[0] = "one"; $numbers[1] = "two"; $numbers[2] = "three"; $numbers[3] = "four"; $numbers[4] = "five"; echo “$numbers”

SINGLE STATEMENT ARRAYS $numbers = array( 1, 2, 3, 4, 5); To call the first place of the array you must use ‘0’, calling ‘0’ will show the first value which is ‘1’ and so forth If you call location ‘4’ it will display “5” If you call location ‘2’ if will display “3”

MULTIPLE STATEMENTS ARRAY $numbers[0] = "one"; $numbers[1] = "two"; $numbers[2] = "three"; $numbers[3] = "four"; $numbers[4] = "five"; With multiple statements array, to call the value you must input the desired place with the right number (the brackets show the location called and will display the number in quotes) If you say get location ‘2’ it will display “three” If you say get location ‘0’ it will display “one” And so on…