{"id":7055,"date":"2021-07-26T12:38:16","date_gmt":"2021-07-26T12:38:16","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7055"},"modified":"2021-07-26T12:38:19","modified_gmt":"2021-07-26T12:38:19","slug":"tutorial-for-assignment-operators","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/","title":{"rendered":"Tutorial for Assignment operators"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">What is Assignment operators?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PHP Assignment operators are used to assign values to variables. The right side value is substituted for the left side value in the operand variable. Operators in this category are in charge of assigning variables. The most frequent assignment operator is =, which assigns the operand&#8217;s right side to the left variable.<\/p>\n\n\n\n<ul class=\"wp-block-list\" id=\"block-3624ffa8-6672-4ce8-bf7e-2f0f27f6babb\"><li>Assignment Same as\u2026 Description<\/li><li><code>x = y x = y<\/code>&nbsp;The left operand gets set to the value of the expression on the right<\/li><li><code>x += y x = x + y<\/code>&nbsp;Addition<\/li><li><code>x -= y x = x - y<\/code>&nbsp;Subtraction<\/li><li><code>x *= y x = x * y&nbsp;<\/code>Multiplication<\/li><li><code>x \/= y x = x \/ y<\/code>&nbsp;Division<\/li><li><code>x %= y x = x % y<\/code>&nbsp;Modulus<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/05\/image-16.png\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:-<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/AdarshAshwani\/5db4a1e0854ab4aa3dfa374b499ef1b2.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:-<\/strong> <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/05\/image-17.png\" alt=\"\"\/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What is Assignment operators? PHP Assignment operators are used to assign values to variables. The right side value is substituted [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":7066,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5388],"tags":[5599,177,5592,5598,5593,670,5600],"class_list":["post-7055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-assignment-operators","tag-php","tag-php-operators","tag-tutorial-for-assignment-operators","tag-tutorials-for-php-operators","tag-what","tag-what-is-assignment-operators"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial for Assignment operators - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial for Assignment operators - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"What is Assignment operators? PHP Assignment operators are used to assign values to variables. The right side value is substituted [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/profile.php?id=100003935402658\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-26T12:38:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-26T12:38:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"580\" \/>\n\t<meta property=\"og:image:height\" content=\"330\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashwani Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashwani Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/\"},\"author\":{\"name\":\"Ashwani Kumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\"},\"headline\":\"Tutorial for Assignment operators\",\"datePublished\":\"2021-07-26T12:38:16+00:00\",\"dateModified\":\"2021-07-26T12:38:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/\"},\"wordCount\":91,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Tutorials-for-PHP-Operators-1.jpeg\",\"keywords\":[\"Assignment operators\",\"Php\",\"PHP Operators\",\"Tutorial for Assignment operators\",\"Tutorials for PHP Operators\",\"What\",\"What is Assignment operators\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/\",\"name\":\"Tutorial for Assignment operators - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Tutorials-for-PHP-Operators-1.jpeg\",\"datePublished\":\"2021-07-26T12:38:16+00:00\",\"dateModified\":\"2021-07-26T12:38:19+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Tutorials-for-PHP-Operators-1.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Tutorials-for-PHP-Operators-1.jpeg\",\"width\":580,\"height\":330},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-assignment-operators\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial for Assignment operators\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\",\"name\":\"Ashwani Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"caption\":\"Ashwani Kumar\"},\"description\":\"There is no end to education. It is not that you read a book, pass an examination, and finish with education. The whole of life, from the moment you are born to the moment you die, is a process of learning.\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100003935402658\",\"https:\\\/\\\/www.instagram.com\\\/adarshashwani\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/adarsh-ashwani-a75b23130\\\/\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/ashwani\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial for Assignment operators - scmGalaxy","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:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial for Assignment operators - scmGalaxy","og_description":"What is Assignment operators? PHP Assignment operators are used to assign values to variables. The right side value is substituted [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/","og_site_name":"scmGalaxy","article_author":"https:\/\/www.facebook.com\/profile.php?id=100003935402658","article_published_time":"2021-07-26T12:38:16+00:00","article_modified_time":"2021-07-26T12:38:19+00:00","og_image":[{"width":580,"height":330,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg","type":"image\/jpeg"}],"author":"Ashwani Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ashwani Kumar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/"},"author":{"name":"Ashwani Kumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31"},"headline":"Tutorial for Assignment operators","datePublished":"2021-07-26T12:38:16+00:00","dateModified":"2021-07-26T12:38:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/"},"wordCount":91,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg","keywords":["Assignment operators","Php","PHP Operators","Tutorial for Assignment operators","Tutorials for PHP Operators","What","What is Assignment operators"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/","name":"Tutorial for Assignment operators - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg","datePublished":"2021-07-26T12:38:16+00:00","dateModified":"2021-07-26T12:38:19+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/07\/Tutorials-for-PHP-Operators-1.jpeg","width":580,"height":330},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-assignment-operators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Tutorial for Assignment operators"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31","name":"Ashwani Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","caption":"Ashwani Kumar"},"description":"There is no end to education. It is not that you read a book, pass an examination, and finish with education. The whole of life, from the moment you are born to the moment you die, is a process of learning.","sameAs":["https:\/\/www.facebook.com\/profile.php?id=100003935402658","https:\/\/www.instagram.com\/adarshashwani\/","https:\/\/www.linkedin.com\/in\/adarsh-ashwani-a75b23130\/"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/ashwani\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7055"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7055\/revisions"}],"predecessor-version":[{"id":7068,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7055\/revisions\/7068"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/7066"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}