Question
, Web Scripting (PHP) , Write a script that uses at - least six string functions. You have to use 3 string functions that is
,
Web Scripting (PHP)
,
Write a script that uses at
-
least six string functions. You have to use 3 string functions that is not
discussed in the book (
www.php.net
) and
the other 3 could be from the book. Inside the script,
explain what the function is doing.
Output:
The initial string displays:
It is becoming increasingly clear that we are responsible for warming of the
Earth primarily due to the burning of f
ossil fuels. Predicting the
implications of this or how the picture will change in the future are big
challenges for scientists and today's report by the IPCC, whilst recognising
uncertainties, gives us the best possible insight into what may lay ahead.
B
y using the <<.............>> string function, now the string is converted to
It is becoming
increasingly clear that
we are responsible for
warming of the Earth
primarily due to the
burning of fossil fuels.
Predicting the
implications of this or
how the picture w
ill
change in the future are
big challenges for
scientists and today's
report by the IPCC,
whilst recognising
uncertainties, gives us
the best possible insight
into what may lay ahead.
Purpose: Comprehend and demonstrate the use of String functions
as discussed in class
.
2.
According to the U.S. Census
Bureau, the 12 largest American cities (by population) in 2005 were as
follows:
(the numbers are not actual numbers)
New Jersey, NJ (9,008,278 people)
Los Angeles, CA (3,694,410)
Chicago, IL (2,985,016)
Houston, TX (1,845,631)
Philadelphia, PA (1,517,550)
Phoenix, AZ (1,321,045)
San Diego, CA (1,283,400)
Dallas, TX (1,188,580)
San Antonio, TX (1,198,646)
Detroit, MI (951,270)
Georgia, GA (378, 457)
New York, NY (678, 4567)
Write a script that d
efine an array (or arrays) that holds this information about loc
ations and population.
Print a table of locations and population information that includes the total population in all 12 cities.
Modify your solution so that the rows in result table are ordered by population.
Then modify your solution so that
the rows are ordered by city name.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started