Posts

Showing posts with the label PHP

Web Technologies e.g. SASS, LESS and Doctrine

Image
Web technologies, as the name indicates are the technology used over the world wide web. These technologies help the users to communicate with each other. You may have learned in your social sciences subject that Language is the main source of communication. Similarly when computers communicate, they also use certain specific language or languages for this.  As we all know HTML is the hypertext markup language. It is the core of web technologies. Then comes JavaScript, React, Angular, Ruby, CSS and so on.  Everyone likes beauty. CSS adds beauty to your page. But you need to write a lot of code for minute things in the style sheet. So to make the task of web developers convenient, Henry Thorton  with  Natalie Weizenbaum   designed and developed SASS (Syntactically Awesome Style Sheets) respectively. SASS is the style sheet language written in PHP. It is an extension to CSS and .css file can be converted to .sccs file. SASS is backward compatible meaning, ...

Palindrome : php

Image
Image source : https://www.grammarly.com/blog/16-surprisingly-funny-palindromes/ Words, numbers, digits, or ... anything,  that remain the same as original if we reverse them are Palindromes. So how could we find if a word or a sentence is palindrome or not? We will use php for this... code: <?php function semiPermeableMembrain ( $str ){ $str = strtolower( $str ); $split = str_split ( $str ); foreach ( $split as $obstacle ){ if ( $obstacle == " " || $obstacle == "'" || $obstacle == "." || $obstacle == "," || $obstacle == ";" || $obstacle == ":" || $obstacle == "-" ) { $obstacle = "/ $obstacle /" ; $str = preg_replace ( $obstacle , '' , $str ); } } palindrome( $str ); ...

PHP chess board : how to make ?

Image
As we have learned much of the basics of  HTML and CSS . Let us now learn how can we make our web applications more user friendly, flexible and versatile, using php . Today we will see how to make a chess board using php in collaboration with HTML and CSS .  So, Let's start: BASIC php SYNTAX: Starting Closing Tags: <?php ?> Php code must be written in these tags. Variables:              Start with "$" sign e.g. $num=3;               ; is really important to put after every statement. Functions:              Functions start with the keyword "function". E.g. function power(){} Print:             echo "printing by using echo";             echo ("printing by using echo");             print "pri...