{"id":242,"date":"2012-06-06T20:31:21","date_gmt":"2012-06-06T19:31:21","guid":{"rendered":"http:\/\/www.futuretrend.co.uk\/blog\/?p=242"},"modified":"2025-08-18T10:11:30","modified_gmt":"2025-08-18T09:11:30","slug":"a-very-gentle-introduction-to-php","status":"publish","type":"post","link":"https:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/","title":{"rendered":"A very gentle introduction to PHP"},"content":{"rendered":"<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><strong><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">So what is PHP?<\/span><\/strong><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">A Server side scripting language \u2013 code that is executed before the page loads (the opposite being client-side, JavaScript for example). \u00a0PHP can generate HTML and is often embedded directly with HTML to generate dynamic web pages.\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">&lt;?php\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> $question = \u2018Can we go on break now?;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">$time = 1045;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">$breaktime = 1100;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">echo \u201c&lt;h1&gt;$question&lt;\/h1&gt;\u201d;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">if ($time &gt;= $breaktime) {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> echo \u201c&lt;p&gt;Good call, see you in five&lt;\/p&gt;\u201d;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">else {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> echo \u201c&lt;p&gt;Computer says no&lt;\/p&gt;\u201d;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">?&gt;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">The server will then compute this script. Any ideas on what the output is?<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><strong><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Why PHP?<\/span><\/strong><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">The snippet of code above demonstrated a conditional &#8211; You can automate what HTML is displayed based on certain conditions. You can also store <strong>variables<\/strong>, which allows for greater flexibility when writing web pages.<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><strong><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Who\u2019s using PHP?<\/span><\/strong><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Facebook, Twitter, Youtube, WordPress, Google, Yahoo, Wikipedia. Alernatives to PHP are asp.net (Microsoft Corp) JSP (Oracle) and Ruby (open source)<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Arrays\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">The amount of data stored in websites these days is impressive \u2013 a typical website these days has usernames and passwords. To authenticate a user, you must match their password with the username. It is pretty easy to match two values together (hint: the conditional). Easy right? Yes! So how is it done\u2026?<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Members\u2019 email addresses are stored in a database and we\u2019ll grab this information using PHP and store it in a variable (I\u2019ll explain this in more detail later) The code below demonstrates how to detect if the user actually exists:<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">&lt;?php<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">$members = array(\u2018John\u2019, \u2019Mary\u2019, \u2019Umi\u2019, \u2019Sarah\u2019, \u2018Lucy\u2019);<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">$login = \u2018John\u2019;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">foreach ($members as $member) {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> if ($member == \u2018$login\u2019) {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> echo \u201cHello $login\u201d;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">?&gt;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Now if you understood what went on above, well done! You\u2019ve just mastered the loop \u2013 the most essential part of programming! The syntax \u00a0for PHP arrays is: $members = array(\u2018John\u2019, \u2019Mary\u2019, \u2019Umi\u2019, \u2019Sarah\u2019, \u2018Lucy\u2019);<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Items in an array are called <strong>elements<\/strong> and if I wanted to output the second element in this array:<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">&lt;?php echo $members[1]; ?&gt;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">That\u2019s no mistake. Array element [0] is the first element, [1] = second and so forth.<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">To print the entire array:<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">&lt;?php print_r($members); ?&gt;<\/span><\/div>\n<div><strong><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">Functions<\/span><\/strong><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">echo and print_r are both functions. They do something to the arguments passed to them. The PHP language has many built-in functions and a developer can also write their own. Functions make code easier to read and allows for code re-use. Functions are a lot like people \u2013 you feed them something and then they spit something out in one way or another:<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">function a_human_being($food) {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">if ($food == tasty) {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> return \u2018burp\u2019;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">else {<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\"> return $food;<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">}<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif;\">If you are confused at this point then give yourself a pat on the back for keeping up. It definitely takes time for the concepts to sink in and I guarantee that by the time you enrol on to the next <a title=\"PHP Training\" href=\"http:\/\/futuretrend.co.uk\/courses\/php_mysql.html\" target=\"_blank\" rel=\"noopener\">PHP training course <\/a>you will be using these concepts as though you knew them all your life. You\u2019ll be making awesome websites in no time!<\/span><\/div>\n<span id='mp-share-below-action'><\/span><ul class='mp-share-buttons'><li class='mp-share-buttons-fb'><div class='fb-like' data-href='https%3A%2F%2Fwww.futuretrend.co.uk%2Fblog%2Fa-very-gentle-introduction-to-php%2F' data-width='' data-layout='button' data-action='like' data-size='small' data-share='true'><\/div><\/li><li class='mp-share-buttons-tw'><a class='twitter-share-button' href='https:\/\/twitter.com\/share'?url='https%3A%2F%2Fwww.futuretrend.co.uk%2Fblog%2F%3Fp%3D242' data-via='Futuretrend_'><\/a><\/li><li class='mp-share-buttons-li' style='margin-top:-10px !important;'><script type='in\/share' data-url='https:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/'><\/script><\/li><\/ul><div class='mp-share-clear-fix'><\/div>","protected":false},"excerpt":{"rendered":"<p>\u00a0 So what is PHP? A Server side scripting language \u2013 code that is executed before the page loads (the opposite being client-side, JavaScript for example). \u00a0PHP can generate HTML and is often embedded directly with HTML to generate dynamic web pages.\u00a0 \u00a0 &lt;?php\u00a0 $question = \u2018Can we go on break now?; $time = 1045; [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mbp_gutenberg_autopost":false},"categories":[7],"tags":[72,71,70],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone\" \/>\n<meta property=\"og:description\" content=\"\u00a0 So what is PHP? A Server side scripting language \u2013 code that is executed before the page loads (the opposite being client-side, JavaScript for example). \u00a0PHP can generate HTML and is often embedded directly with HTML to generate dynamic web pages.\u00a0 \u00a0 &lt;?php\u00a0 $question = \u2018Can we go on break now?; $time = 1045; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Futuretrend&#039;s Blog Zone\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/FuturetrendTraining\" \/>\n<meta property=\"article:published_time\" content=\"2012-06-06T19:31:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-18T09:11:30+00:00\" \/>\n<meta name=\"author\" content=\"TerraKina\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Futuretrend_\" \/>\n<meta name=\"twitter:site\" content=\"@Futuretrend_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TerraKina\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\"},\"author\":{\"name\":\"TerraKina\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/878ed8bb6369180b9748e92d7a2ac7f3\"},\"headline\":\"A very gentle introduction to PHP\",\"datePublished\":\"2012-06-06T19:31:21+00:00\",\"dateModified\":\"2025-08-18T09:11:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\"},\"wordCount\":514,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#organization\"},\"keywords\":[\"intro to PHP\",\"Learning PHP\",\"PHP\"],\"articleSection\":[\"Web and Graphic Design Training\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\",\"url\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\",\"name\":\"A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone\",\"isPartOf\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#website\"},\"datePublished\":\"2012-06-06T19:31:21+00:00\",\"dateModified\":\"2025-08-18T09:11:30+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.futuretrend.co.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A very gentle introduction to PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#website\",\"url\":\"http:\/\/www.futuretrend.co.uk\/blog\/\",\"name\":\"Futuretrend Blog Zone\",\"description\":\"General musings and the scoop from inside Futuretrend\",\"publisher\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.futuretrend.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#organization\",\"name\":\"Futuretrend Training Academy\",\"url\":\"http:\/\/www.futuretrend.co.uk\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.futuretrend.co.uk\/blog\/wp-content\/uploads\/blog-header.jpg\",\"contentUrl\":\"http:\/\/www.futuretrend.co.uk\/blog\/wp-content\/uploads\/blog-header.jpg\",\"width\":960,\"height\":250,\"caption\":\"Futuretrend Training Academy\"},\"image\":{\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/FuturetrendTraining\",\"https:\/\/twitter.com\/Futuretrend_\",\"https:\/\/www.linkedin.com\/company\/1699092\/admin\/\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/878ed8bb6369180b9748e92d7a2ac7f3\",\"name\":\"TerraKina\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c20e7ae1412d72925bf1bb5a0abdc74d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c20e7ae1412d72925bf1bb5a0abdc74d?s=96&d=mm&r=g\",\"caption\":\"TerraKina\"},\"url\":\"https:\/\/www.futuretrend.co.uk\/blog\/author\/terrakina\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone","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":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/","og_locale":"en_US","og_type":"article","og_title":"A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone","og_description":"\u00a0 So what is PHP? A Server side scripting language \u2013 code that is executed before the page loads (the opposite being client-side, JavaScript for example). \u00a0PHP can generate HTML and is often embedded directly with HTML to generate dynamic web pages.\u00a0 \u00a0 &lt;?php\u00a0 $question = \u2018Can we go on break now?; $time = 1045; [&hellip;]","og_url":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/","og_site_name":"Futuretrend&#039;s Blog Zone","article_publisher":"https:\/\/www.facebook.com\/FuturetrendTraining","article_published_time":"2012-06-06T19:31:21+00:00","article_modified_time":"2025-08-18T09:11:30+00:00","author":"TerraKina","twitter_card":"summary_large_image","twitter_creator":"@Futuretrend_","twitter_site":"@Futuretrend_","twitter_misc":{"Written by":"TerraKina","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#article","isPartOf":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/"},"author":{"name":"TerraKina","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/878ed8bb6369180b9748e92d7a2ac7f3"},"headline":"A very gentle introduction to PHP","datePublished":"2012-06-06T19:31:21+00:00","dateModified":"2025-08-18T09:11:30+00:00","mainEntityOfPage":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/"},"wordCount":514,"commentCount":0,"publisher":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/#organization"},"keywords":["intro to PHP","Learning PHP","PHP"],"articleSection":["Web and Graphic Design Training"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/","url":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/","name":"A very gentle introduction to PHP - Futuretrend&#039;s Blog Zone","isPartOf":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/#website"},"datePublished":"2012-06-06T19:31:21+00:00","dateModified":"2025-08-18T09:11:30+00:00","breadcrumb":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.futuretrend.co.uk\/blog\/a-very-gentle-introduction-to-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.futuretrend.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"A very gentle introduction to PHP"}]},{"@type":"WebSite","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#website","url":"http:\/\/www.futuretrend.co.uk\/blog\/","name":"Futuretrend Blog Zone","description":"General musings and the scoop from inside Futuretrend","publisher":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.futuretrend.co.uk\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#organization","name":"Futuretrend Training Academy","url":"http:\/\/www.futuretrend.co.uk\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/logo\/image\/","url":"http:\/\/www.futuretrend.co.uk\/blog\/wp-content\/uploads\/blog-header.jpg","contentUrl":"http:\/\/www.futuretrend.co.uk\/blog\/wp-content\/uploads\/blog-header.jpg","width":960,"height":250,"caption":"Futuretrend Training Academy"},"image":{"@id":"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/FuturetrendTraining","https:\/\/twitter.com\/Futuretrend_","https:\/\/www.linkedin.com\/company\/1699092\/admin\/"]},{"@type":"Person","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/878ed8bb6369180b9748e92d7a2ac7f3","name":"TerraKina","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.futuretrend.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c20e7ae1412d72925bf1bb5a0abdc74d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c20e7ae1412d72925bf1bb5a0abdc74d?s=96&d=mm&r=g","caption":"TerraKina"},"url":"https:\/\/www.futuretrend.co.uk\/blog\/author\/terrakina\/"}]}},"_links":{"self":[{"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/posts\/242"}],"collection":[{"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":3,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":1007,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions\/1007"}],"wp:attachment":[{"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.futuretrend.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}