SlideShare a Scribd company logo
1 of 17
Introduction to PHP 
Initializing Arrays 
• No of ways to initialize the array. 
– For e.g. 
• $ncststaff[] = “amrish”; 
$ncststaff[] = “murali”; 
$ncststaff[] = “narayan”; 
• $ncststaff[123] = “amrish”; 
$ncststaff[122] = “murali”; 
$ncststaff[121] = “narayan”; 
• $ncststaff = array (“amrish”, “murali”, “narayan”); 
– to change the indices of the array use => operator. 
A. Chaubal 1
Introduction to PHP 
Accessing the Array Elements 
• The elements in the array can be accessed by 
using the list and each constructs 
– for e.g 
while(list($key,$value) = each(countries)) 
echo(“$value<BR>n”); 
– current(<arrayname>) gives the current value 
being accessed. key(<arrayname>) gives the index 
of the current element that is being accessed. 
– prev(<arrayname>) gives the previous element. 
– next(<arrayname>) gives the next element. 
A. Chaubal 2
Introduction to PHP 
Accessing the Array Elements (cont.) 
– Array_walk(<arrayname>,<function_name>) 
• function_name is the function that is written for every 
member of an array. 
• For e.g 
$ncststaff = array (“amrish”, “murali”, “narayan”); 
array_walk ($ncststaff, printstaff); 
// function to print each element of the array 
function printstaff($names) { 
echo “<B>$names</B><BR>n”; 
} 
A. Chaubal 3
Introduction to PHP 
Arrays (cont.) 
• $ncststaff = array (“dake” => array(“amrish”, “lakshana”, “venkat”), 
“spc” => array(“narayan”, “murali”,“prasad”)); 
– creates a two dimensional array. 
• Sorting Functions 
– sort() : sorts the elements in the numeric and 
alphabetical order. 
– rsort() : sorts the elements in the reverse order. 
– asort() : sorts the elements in the array without 
changing the indices. 
– ksort() : sorts the arrays by key. 
A. Chaubal 4
Introduction to PHP 
Classes 
• Class is a template of an object and includes 
the properties and methods that describe an 
object and behavior. 
• Class in PHP is defined using class statement. 
A. Chaubal 5
Introduction to PHP Classes (cont.) 
• For e.g 
<? 
class company { 
// define the properties 
var $companyname; 
// define the methods 
function company($cname) { 
$this->companyname = $cname; 
} 
function getnames($idcode) { 
//return the name of the employee for the required idcode 
} 
} 
?> 
A. Chaubal 6
Introduction to PHP 
PHP Richness 
• PHP comes with myriad of options i.e. 
supports several APIs and interfaces to other 
programming tools such as 
– Database connectivity. 
– LDAP 
– XML 
– Mail protocols such as IMAP, SMTP 
– Image functions 
etc…. 
A. Chaubal 7
Introduction to PHP 
Support for Regular Expressions 
• Not pretty things to look at and work with. 
– E.g. ^.+@.+..+$ 
• PHP takes over the headache from the 
programmers for explicitly coding for pattern 
matching. 
• Functions: 
– ereg() and eregi() 
– ereg_replace() & eregi_replace() 
– split() 
A. Chaubal 8
Introduction to PHP 
Image Generation & Manipulation 
• PHP offers powerful set of functions for 
generating and manipulating the images. 
– Rendering regular geometric figures, modifying 
images 
– manipulate text, font and color and even the pixels 
in the image. 
• ….creating the images on the fly. 
A. Chaubal 9
Introduction to PHP 
Image Generation & Manipulation 
(cont.) 
• PHP uses the GD library for the most of the image 
functionality that it offers. 
• GD library is used for generating the two-dimensional 
graphics. 
• PHP API’s provides us with functions to: 
– Create, delete, resize and modify images. 
– Draw basic geometric figures 
– Manipulate text and fonts 
– Manipulate colors 
– Interlace and manipulate pixels 
– Handle PostScript files 
A. Chaubal 10
Introduction to PHP 
Mailing functions 
• Sending E-Mails 
– Mail() 
• Used to send simple text messages. 
• Depends on the local mail delivery system. 
– Using SMTP 
• Accepts the e-mail for every recipient and goes through trouble 
of delivering the e-mails. 
• Receiving E-Mails 
– PHP works out well with the IMAP protocol. 
– Rich set of support functions 
• Imap_open, impa_delete, imap_close, imap_mail_copy, 
imap_mail_move etc. 
A. Chaubal 11
Introduction to PHP 
PHP-Database Connectivity 
• Supports APIs for accessing large number of 
databases. 
• ODBC is a standard API for accessing a 
database that has PHP support. 
A. Chaubal 12
Introduction to PHP 
PHP-Database Connectivity 
• Some of Oracle 8.x functions. 
– OCILogon 
– OCILogoff 
– OCIParse 
– OCIFetch; OCIFetchInto; OCIFetchStatement 
– OCIExecute 
– OCIFreeStatement 
A. Chaubal 13
Introduction to PHP 
LDAP Support in PHP 
• PHP provides LDAP API’s that allows the 
programmers to create LDAP clients; by 
providing transparent access to backend LDAP 
directory servers. 
– For e.g. 
• Web based e-mail client. 
• Telephone Directory. 
A. Chaubal 14
Introduction to PHP 
XML Support in PHP 
• PHP supports a set of functions that can be 
used for writing PHP-based XML applications. 
• These functions are used for parsing well 
formed XML document. 
A. Chaubal 15
Introduction to PHP 
References 
• Professional PHP programming 
– By Jesus Castagnetto, Chris Schollo et al 
• www.phpbuilder.com 
• www.php.net 
A. Chaubal 16
Introduction to PHP 
THANK YOU 
A. Chaubal 17

More Related Content

What's hot

SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.Ruslan Shevchenko
 
Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013Prof. Wim Van Criekinge
 
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.Scala-Gopher: CSP-style programming techniques with idiomatic Scala.
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.Ruslan Shevchenko
 
Apache Velocity
Apache Velocity Apache Velocity
Apache Velocity yesprakash
 
Z ray plugins for dummies
Z ray plugins for dummiesZ ray plugins for dummies
Z ray plugins for dummiesDmitry Zbarski
 
PHP Unit 3 functions_in_php_2
PHP Unit 3 functions_in_php_2PHP Unit 3 functions_in_php_2
PHP Unit 3 functions_in_php_2Kumar
 
Building a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGLBuilding a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGLLuka Jacobowitz
 
Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3Adam Culp
 
Class 3 - PHP Functions
Class 3 - PHP FunctionsClass 3 - PHP Functions
Class 3 - PHP FunctionsAhmed Swilam
 
From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)Alexandre Rafalovitch
 
Php Chapter 2 3 Training
Php Chapter 2 3 TrainingPhp Chapter 2 3 Training
Php Chapter 2 3 TrainingChris Chubb
 
Php my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.netPhp my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.netProgrammer Blog
 
Introduction to web and php mysql
Introduction to web and php mysqlIntroduction to web and php mysql
Introduction to web and php mysqlProgrammer Blog
 
Object-Oriented Programming with PHP (part 1)
Object-Oriented Programming with PHP (part 1)Object-Oriented Programming with PHP (part 1)
Object-Oriented Programming with PHP (part 1)Bozhidar Boshnakov
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
 

What's hot (20)

SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.
 
Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013
 
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.Scala-Gopher: CSP-style programming techniques with idiomatic Scala.
Scala-Gopher: CSP-style programming techniques with idiomatic Scala.
 
Apache Velocity
Apache Velocity Apache Velocity
Apache Velocity
 
Z ray plugins for dummies
Z ray plugins for dummiesZ ray plugins for dummies
Z ray plugins for dummies
 
PHP Unit 3 functions_in_php_2
PHP Unit 3 functions_in_php_2PHP Unit 3 functions_in_php_2
PHP Unit 3 functions_in_php_2
 
Building a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGLBuilding a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGL
 
Intro to Perl and Bioperl
Intro to Perl and BioperlIntro to Perl and Bioperl
Intro to Perl and Bioperl
 
es6
es6es6
es6
 
Introduction to Perl and BioPerl
Introduction to Perl and BioPerlIntroduction to Perl and BioPerl
Introduction to Perl and BioPerl
 
Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3
 
Class 3 - PHP Functions
Class 3 - PHP FunctionsClass 3 - PHP Functions
Class 3 - PHP Functions
 
From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)
 
Php Chapter 2 3 Training
Php Chapter 2 3 TrainingPhp Chapter 2 3 Training
Php Chapter 2 3 Training
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Php my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.netPhp my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.net
 
Introduction to web and php mysql
Introduction to web and php mysqlIntroduction to web and php mysql
Introduction to web and php mysql
 
Object-Oriented Programming with PHP (part 1)
Object-Oriented Programming with PHP (part 1)Object-Oriented Programming with PHP (part 1)
Object-Oriented Programming with PHP (part 1)
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
 

Viewers also liked

Viewers also liked (15)

hi there
hi therehi there
hi there
 
Prueba bartolo
Prueba bartoloPrueba bartolo
Prueba bartolo
 
lanre's CV2
lanre's CV2lanre's CV2
lanre's CV2
 
SPC Severe Thunderstorm Watch 236
SPC Severe Thunderstorm Watch 236SPC Severe Thunderstorm Watch 236
SPC Severe Thunderstorm Watch 236
 
Norway: Legal and regulatory CCS framework
Norway: Legal and regulatory CCS frameworkNorway: Legal and regulatory CCS framework
Norway: Legal and regulatory CCS framework
 
Verge
VergeVerge
Verge
 
Marine drive uni pole
Marine drive uni poleMarine drive uni pole
Marine drive uni pole
 
5796 5800.output
5796 5800.output5796 5800.output
5796 5800.output
 
3rd meeting in Greece
3rd meeting in Greece3rd meeting in Greece
3rd meeting in Greece
 
Task 1 uses and purposes of digital
Task 1   uses and purposes of digitalTask 1   uses and purposes of digital
Task 1 uses and purposes of digital
 
History of automobiles 2015
History of automobiles 2015History of automobiles 2015
History of automobiles 2015
 
Pyrexia of unknown origin
Pyrexia of unknown originPyrexia of unknown origin
Pyrexia of unknown origin
 
Strongyloidiasis
StrongyloidiasisStrongyloidiasis
Strongyloidiasis
 
GROOMING ASSIGNMENT
GROOMING ASSIGNMENTGROOMING ASSIGNMENT
GROOMING ASSIGNMENT
 
презентации 3,4,5,6,7
презентации 3,4,5,6,7презентации 3,4,5,6,7
презентации 3,4,5,6,7
 

Similar to Initializing arrays

Similar to Initializing arrays (20)

Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php
PhpPhp
Php
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdf
 
rtwerewr
rtwerewrrtwerewr
rtwerewr
 
05php
05php05php
05php
 
05php
05php05php
05php
 
Php Intermediate
Php IntermediatePhp Intermediate
Php Intermediate
 
05php
05php05php
05php
 
php fundamental
php fundamentalphp fundamental
php fundamental
 
Php introduction with history of php
Php introduction with history of phpPhp introduction with history of php
Php introduction with history of php
 
php
phpphp
php
 
WEB-MODULE 4.pdf
WEB-MODULE 4.pdfWEB-MODULE 4.pdf
WEB-MODULE 4.pdf
 
Php Introduction nikul
Php Introduction nikulPhp Introduction nikul
Php Introduction nikul
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php Basics
Php BasicsPhp Basics
Php Basics
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 

More from Synapseindiappsdevelopment

Synapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapseindiappsdevelopment
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseindiappsdevelopment
 
SynapseIndia dotnet development platform overview
SynapseIndia  dotnet development platform overviewSynapseIndia  dotnet development platform overview
SynapseIndia dotnet development platform overviewSynapseindiappsdevelopment
 
SynapseIndia dotnet web applications development
SynapseIndia  dotnet web applications developmentSynapseIndia  dotnet web applications development
SynapseIndia dotnet web applications developmentSynapseindiappsdevelopment
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security developmentSynapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseindiappsdevelopment
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseindiappsdevelopment
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseindiappsdevelopment
 
SynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseindiappsdevelopment
 

More from Synapseindiappsdevelopment (20)

Synapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapse india elance top in demand in it skills
Synapse india elance top in demand in it skills
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture module
 
SynapseIndia dotnet module development part 1
SynapseIndia  dotnet module development part 1SynapseIndia  dotnet module development part 1
SynapseIndia dotnet module development part 1
 
SynapseIndia dotnet framework library
SynapseIndia  dotnet framework librarySynapseIndia  dotnet framework library
SynapseIndia dotnet framework library
 
SynapseIndia dotnet development platform overview
SynapseIndia  dotnet development platform overviewSynapseIndia  dotnet development platform overview
SynapseIndia dotnet development platform overview
 
SynapseIndia dotnet development framework
SynapseIndia  dotnet development frameworkSynapseIndia  dotnet development framework
SynapseIndia dotnet development framework
 
SynapseIndia dotnet web applications development
SynapseIndia  dotnet web applications developmentSynapseIndia  dotnet web applications development
SynapseIndia dotnet web applications development
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security development
 
SynapseIndia mobile build apps management
SynapseIndia mobile build apps managementSynapseIndia mobile build apps management
SynapseIndia mobile build apps management
 
SynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architecture
 
SynapseIndia java and .net development
SynapseIndia java and .net developmentSynapseIndia java and .net development
SynapseIndia java and .net development
 
SynapseIndia dotnet development panel control
SynapseIndia dotnet development panel controlSynapseIndia dotnet development panel control
SynapseIndia dotnet development panel control
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client library
 
SynapseIndia php web development
SynapseIndia php web developmentSynapseIndia php web development
SynapseIndia php web development
 
SynapseIndia mobile apps architecture
SynapseIndia mobile apps architectureSynapseIndia mobile apps architecture
SynapseIndia mobile apps architecture
 
SynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architecture
 
SynapseIndia mobile apps
SynapseIndia mobile appsSynapseIndia mobile apps
SynapseIndia mobile apps
 
SynapseIndia dotnet development
SynapseIndia dotnet developmentSynapseIndia dotnet development
SynapseIndia dotnet development
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library Development
 
SynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically development
 

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Initializing arrays

  • 1. Introduction to PHP Initializing Arrays • No of ways to initialize the array. – For e.g. • $ncststaff[] = “amrish”; $ncststaff[] = “murali”; $ncststaff[] = “narayan”; • $ncststaff[123] = “amrish”; $ncststaff[122] = “murali”; $ncststaff[121] = “narayan”; • $ncststaff = array (“amrish”, “murali”, “narayan”); – to change the indices of the array use => operator. A. Chaubal 1
  • 2. Introduction to PHP Accessing the Array Elements • The elements in the array can be accessed by using the list and each constructs – for e.g while(list($key,$value) = each(countries)) echo(“$value<BR>n”); – current(<arrayname>) gives the current value being accessed. key(<arrayname>) gives the index of the current element that is being accessed. – prev(<arrayname>) gives the previous element. – next(<arrayname>) gives the next element. A. Chaubal 2
  • 3. Introduction to PHP Accessing the Array Elements (cont.) – Array_walk(<arrayname>,<function_name>) • function_name is the function that is written for every member of an array. • For e.g $ncststaff = array (“amrish”, “murali”, “narayan”); array_walk ($ncststaff, printstaff); // function to print each element of the array function printstaff($names) { echo “<B>$names</B><BR>n”; } A. Chaubal 3
  • 4. Introduction to PHP Arrays (cont.) • $ncststaff = array (“dake” => array(“amrish”, “lakshana”, “venkat”), “spc” => array(“narayan”, “murali”,“prasad”)); – creates a two dimensional array. • Sorting Functions – sort() : sorts the elements in the numeric and alphabetical order. – rsort() : sorts the elements in the reverse order. – asort() : sorts the elements in the array without changing the indices. – ksort() : sorts the arrays by key. A. Chaubal 4
  • 5. Introduction to PHP Classes • Class is a template of an object and includes the properties and methods that describe an object and behavior. • Class in PHP is defined using class statement. A. Chaubal 5
  • 6. Introduction to PHP Classes (cont.) • For e.g <? class company { // define the properties var $companyname; // define the methods function company($cname) { $this->companyname = $cname; } function getnames($idcode) { //return the name of the employee for the required idcode } } ?> A. Chaubal 6
  • 7. Introduction to PHP PHP Richness • PHP comes with myriad of options i.e. supports several APIs and interfaces to other programming tools such as – Database connectivity. – LDAP – XML – Mail protocols such as IMAP, SMTP – Image functions etc…. A. Chaubal 7
  • 8. Introduction to PHP Support for Regular Expressions • Not pretty things to look at and work with. – E.g. ^.+@.+..+$ • PHP takes over the headache from the programmers for explicitly coding for pattern matching. • Functions: – ereg() and eregi() – ereg_replace() & eregi_replace() – split() A. Chaubal 8
  • 9. Introduction to PHP Image Generation & Manipulation • PHP offers powerful set of functions for generating and manipulating the images. – Rendering regular geometric figures, modifying images – manipulate text, font and color and even the pixels in the image. • ….creating the images on the fly. A. Chaubal 9
  • 10. Introduction to PHP Image Generation & Manipulation (cont.) • PHP uses the GD library for the most of the image functionality that it offers. • GD library is used for generating the two-dimensional graphics. • PHP API’s provides us with functions to: – Create, delete, resize and modify images. – Draw basic geometric figures – Manipulate text and fonts – Manipulate colors – Interlace and manipulate pixels – Handle PostScript files A. Chaubal 10
  • 11. Introduction to PHP Mailing functions • Sending E-Mails – Mail() • Used to send simple text messages. • Depends on the local mail delivery system. – Using SMTP • Accepts the e-mail for every recipient and goes through trouble of delivering the e-mails. • Receiving E-Mails – PHP works out well with the IMAP protocol. – Rich set of support functions • Imap_open, impa_delete, imap_close, imap_mail_copy, imap_mail_move etc. A. Chaubal 11
  • 12. Introduction to PHP PHP-Database Connectivity • Supports APIs for accessing large number of databases. • ODBC is a standard API for accessing a database that has PHP support. A. Chaubal 12
  • 13. Introduction to PHP PHP-Database Connectivity • Some of Oracle 8.x functions. – OCILogon – OCILogoff – OCIParse – OCIFetch; OCIFetchInto; OCIFetchStatement – OCIExecute – OCIFreeStatement A. Chaubal 13
  • 14. Introduction to PHP LDAP Support in PHP • PHP provides LDAP API’s that allows the programmers to create LDAP clients; by providing transparent access to backend LDAP directory servers. – For e.g. • Web based e-mail client. • Telephone Directory. A. Chaubal 14
  • 15. Introduction to PHP XML Support in PHP • PHP supports a set of functions that can be used for writing PHP-based XML applications. • These functions are used for parsing well formed XML document. A. Chaubal 15
  • 16. Introduction to PHP References • Professional PHP programming – By Jesus Castagnetto, Chris Schollo et al • www.phpbuilder.com • www.php.net A. Chaubal 16
  • 17. Introduction to PHP THANK YOU A. Chaubal 17