PHP String

This page teaches you about PHP strings.

A string is a quoted bunch of characters that can be letters, numbers, punctuation, etc. You use the quoted text within a function or you can store the string as a variable. You can use single or double quotes but to print out the string within other text you will have to use double quotation marks (like the example below) so you might as well use double quotation marks by default. For the most part, there is no limitation on how long a string can be.

PHP String

PHP Page

<html>
<head>
<title>HTML tutorial</title>
</head>

<body>

<?php
$town="New York";
echo $town;
echo "New York";
?>


</body>
</html>



This is how it looks

New York
New York






 
Bookmark this page:
   
 
Shared Hosts
Lunarpages.com Web Hosting

Domain Registrars
PPC Networks
Logos
Affiliate Networks
Resources