{"id":86,"date":"2021-03-02T09:52:36","date_gmt":"2021-03-02T09:52:36","guid":{"rendered":"https:\/\/bcisnotes.com\/fourthsemester\/?p=86"},"modified":"2021-03-02T09:52:36","modified_gmt":"2021-03-02T09:52:36","slug":"php","status":"publish","type":"post","link":"https:\/\/bcisnotes.com\/fourthsemester\/php\/","title":{"rendered":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes"},"content":{"rendered":"<h3>\u00a0PHP<\/h3>\n<p>PHP is an acronym for &#8220;PHP: Hypertext Preprocessor&#8221;. Itis a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The Hypertext Preprocessor reference implementation is now produced by The Hypertext Preprocessor Group. Hypertext Preprocessoris a widely-used, open-source scripting language<\/p>\n<h4><strong>What is a Hypertext Preprocessor File?<\/strong><\/h4>\n<ul>\n<li>It&#8217;s files can contain text, HTML, CSS, JavaScript, and PHP code<\/li>\n<li>It&#8217;s code is executed on the server, and the result is returned to the browser as plain HTML<\/li>\n<li>It&#8217;s files have extension &#8220;.php&#8221;<\/li>\n<\/ul>\n<h4><strong>What Can Hypertext Preprocessor Do?<\/strong><\/h4>\n<ul>\n<li>It can generate the dynamic page content<\/li>\n<li>It can create, open, read, write, delete, and close files on the server<\/li>\n<li>It\u00a0can collect form data<\/li>\n<li>It can send and receive cookies<\/li>\n<li>It can add, delete, modify data in your database<\/li>\n<li>Itcan be used to control user-access<\/li>\n<li>It can encrypt data<\/li>\n<li>With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong>Why Hypertext Preprocessor?<\/strong><\/h4>\n<ul>\n<li>It can be runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)<\/li>\n<li>It can be is compatible with almost all servers used today (Apache, IIS, etc.)<\/li>\n<li>It can be supports a wide range of databases<\/li>\n<li>It can be is free Download it from the official Hypertext Preprocessor resource<\/li>\n<li>It can be is easy to learn and runs efficiently on the server-side<\/li>\n<\/ul>\n<h4><strong><u>Syntax of Hypertext Preprocessor<\/u><\/strong><\/h4>\n<p>&lt;?php<\/p>\n<p>\/\/ Hypertext Preprocessor code goes here<\/p>\n<p>?&gt;<\/p>\n<h4><strong>Example<\/strong><\/h4>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;h1&gt;My first Hypertext Preprocessor page&lt;\/h1&gt;<\/p>\n<p>&lt;?php<\/p>\n<p>echo &#8220;Hello World!&#8221;;<\/p>\n<p>?&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<h4><strong>Hypertext Preprocessor Case Sensitivity<\/strong><\/h4>\n<p>In Hypertext Preprocessor, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case-sensitive.<\/p>\n<p>In the example below, all three echo statements below are equal and legal:<\/p>\n<p>Example<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;?php<\/p>\n<p>ECHO &#8220;Hello World!&lt;br&gt;&#8221;;<\/p>\n<p>echo &#8220;Hello World!&lt;br&gt;&#8221;;<\/p>\n<p>EcHo &#8220;Hello World!&lt;br&gt;&#8221;;<\/p>\n<p>?&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>Look at the example below; only the first statement will display the value of the $color variable! This is because $color, $COLOR, and $coLOR are treated as three different variables:<\/p>\n<p>Example<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;?php<\/p>\n<p>$color = &#8220;red&#8221;;<\/p>\n<p>echo &#8220;My car is &#8221; . $color . &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>echo &#8220;My house is &#8221; . $COLOR . &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>echo &#8220;My boat is &#8221; . $coLOR . &#8220;&lt;br&gt;&#8221;;<\/p>\n<p>?&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><strong>You may also like:<\/strong> <a href=\"https:\/\/bcisnotes.com\/fourthsemester\/?p=94\" target=\"_blank\" rel=\"noopener noreferrer\">introduction of database<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\u00a0PHP PHP is an acronym for &#8220;PHP: Hypertext Preprocessor&#8221;. Itis a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian <a class=\"mh-excerpt-more\" href=\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\" title=\"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[25,24],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes<\/title>\n<meta name=\"description\" content=\"PHP is an acronym for &quot;PHP: Hypertext Preprocessor&quot;. Itis a general-purpose scripting language especially suited to web development.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes\" \/>\n<meta property=\"og:description\" content=\"PHP is an acronym for &quot;PHP: Hypertext Preprocessor&quot;. Itis a general-purpose scripting language especially suited to web development.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\" \/>\n<meta property=\"og:site_name\" content=\"BCIS Fourth Semester\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-02T09:52:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"340\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mandira Gurung\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mandira Gurung\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\"},\"author\":{\"name\":\"Mandira Gurung\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/53fd2d050498678068327eee9eab44a0\"},\"headline\":\"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes\",\"datePublished\":\"2021-03-02T09:52:36+00:00\",\"dateModified\":\"2021-03-02T09:52:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\"},\"wordCount\":454,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg\",\"keywords\":[\"examples of pho\",\"introduction of php\"],\"articleSection\":[\"IT\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\",\"name\":\"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes\",\"isPartOf\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg\",\"datePublished\":\"2021-03-02T09:52:36+00:00\",\"dateModified\":\"2021-03-02T09:52:36+00:00\",\"description\":\"PHP is an acronym for \\\"PHP: Hypertext Preprocessor\\\". Itis a general-purpose scripting language especially suited to web development.\",\"breadcrumb\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bcisnotes.com\/fourthsemester\/php\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg\",\"contentUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg\",\"width\":340,\"height\":230,\"caption\":\"PHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bcisnotes.com\/fourthsemester\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#website\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/\",\"name\":\"BCIS Fourth Semester\",\"description\":\"Notes of Information and Technology\",\"publisher\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bcisnotes.com\/fourthsemester\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\",\"name\":\"BCIS Fourth Semester\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg\",\"contentUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg\",\"width\":300,\"height\":100,\"caption\":\"BCIS Fourth Semester\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/53fd2d050498678068327eee9eab44a0\",\"name\":\"Mandira Gurung\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a1059d40f7ab5e57f2659e94306c6a9a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a1059d40f7ab5e57f2659e94306c6a9a?s=96&d=mm&r=g\",\"caption\":\"Mandira Gurung\"},\"sameAs\":[\"http:\/\/bcisnotes.com\/fourthsemester\"],\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/author\/mandira\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes","description":"PHP is an acronym for \"PHP: Hypertext Preprocessor\". Itis a general-purpose scripting language especially suited to web development.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bcisnotes.com\/fourthsemester\/php\/","og_locale":"en_US","og_type":"article","og_title":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes","og_description":"PHP is an acronym for \"PHP: Hypertext Preprocessor\". Itis a general-purpose scripting language especially suited to web development.","og_url":"https:\/\/bcisnotes.com\/fourthsemester\/php\/","og_site_name":"BCIS Fourth Semester","article_published_time":"2021-03-02T09:52:36+00:00","og_image":[{"width":340,"height":230,"url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg","type":"image\/jpeg"}],"author":"Mandira Gurung","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mandira Gurung","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#article","isPartOf":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/"},"author":{"name":"Mandira Gurung","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/53fd2d050498678068327eee9eab44a0"},"headline":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes","datePublished":"2021-03-02T09:52:36+00:00","dateModified":"2021-03-02T09:52:36+00:00","mainEntityOfPage":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/"},"wordCount":454,"commentCount":0,"publisher":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage"},"thumbnailUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg","keywords":["examples of pho","introduction of php"],"articleSection":["IT"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bcisnotes.com\/fourthsemester\/php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/","url":"https:\/\/bcisnotes.com\/fourthsemester\/php\/","name":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes","isPartOf":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage"},"thumbnailUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg","datePublished":"2021-03-02T09:52:36+00:00","dateModified":"2021-03-02T09:52:36+00:00","description":"PHP is an acronym for \"PHP: Hypertext Preprocessor\". Itis a general-purpose scripting language especially suited to web development.","breadcrumb":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bcisnotes.com\/fourthsemester\/php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#primaryimage","url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg","contentUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/03\/logo-2.jpg","width":340,"height":230,"caption":"PHP"},{"@type":"BreadcrumbList","@id":"https:\/\/bcisnotes.com\/fourthsemester\/php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bcisnotes.com\/fourthsemester\/"},{"@type":"ListItem","position":2,"name":"PHP || Introduction of PHP(Hypertext Preprocessor) || Bcisnotes"}]},{"@type":"WebSite","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#website","url":"https:\/\/bcisnotes.com\/fourthsemester\/","name":"BCIS Fourth Semester","description":"Notes of Information and Technology","publisher":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bcisnotes.com\/fourthsemester\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization","name":"BCIS Fourth Semester","url":"https:\/\/bcisnotes.com\/fourthsemester\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/","url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg","contentUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg","width":300,"height":100,"caption":"BCIS Fourth Semester"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/53fd2d050498678068327eee9eab44a0","name":"Mandira Gurung","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a1059d40f7ab5e57f2659e94306c6a9a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a1059d40f7ab5e57f2659e94306c6a9a?s=96&d=mm&r=g","caption":"Mandira Gurung"},"sameAs":["http:\/\/bcisnotes.com\/fourthsemester"],"url":"https:\/\/bcisnotes.com\/fourthsemester\/author\/mandira\/"}]}},"_links":{"self":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/86"}],"collection":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":2,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/86\/revisions\/101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/media\/100"}],"wp:attachment":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}