Computer Science > QUESTIONS & ANSWERS > computer science FR question. mostly tested. with little snippet to tackle it (All)
A string is simply a collection of text—letters, numbers, special characters, or a combination thereof. Strings can be manipulated, cut, trimmed, truncated, spliced, and concatenated with ease in PH ... P. $fname = "Peter" ; $lname = "MacIntyre" ; $string = "The first name of the author of this book is $fname and his last name is $lname"; echo $string ; Here, in the creation of the $string variable, the code makes reference to two other variable names, and PHP interpolates (inserts) their contents. We can then echo out the $string variable. We can also accomplish this using single quotes, but we would have to do some concatenation with the period operator, because using single quotes do not allow for variable expansion (variable content insertion). The following code uses the single quote approach: $fname = "Peter" ; $lname = "MacIntyre" ; $string = 'The first name of the author of this book is ' . $fname . ' and his last name is ' . $lname ; echo $string ; [Show More]
Last updated: 3 years ago
Preview 1 out of 1 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jul 31, 2021
Number of pages
1
Written in
All
This document has been written for:
Uploaded
Jul 31, 2021
Downloads
0
Views
60
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·